[coreboot] [commit] r5687 - trunk/util/sconfig

repository service svn at coreboot.org
Mon Aug 9 14:58:17 CEST 2010


Author: oxygene
Date: Mon Aug  9 14:58:16 2010
New Revision: 5687
URL: https://tracker.coreboot.org/trac/coreboot/changeset/5687

Log:
Fix build error introduced in r5868.

aliased_name was a compatibility hack to match the output of the C rewrite
with the python version's results. It seems that we carried these
useless symbols with us for years, just without any impact good or bad.

By declaring devices static and tightening the screws (-Werror), the
compiler now knows that these declarations are useless - and stops.


Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
Acked-by: Stefan Reinauer <stefan.reinauer at coresystems.de>

Modified:
   trunk/util/sconfig/main.c
   trunk/util/sconfig/sconfig.h

Modified: trunk/util/sconfig/main.c
==============================================================================
--- trunk/util/sconfig/main.c	Mon Aug  9 14:02:00 2010	(r5686)
+++ trunk/util/sconfig/main.c	Mon Aug  9 14:58:16 2010	(r5687)
@@ -223,8 +223,6 @@
 				if (device_match(d, cmp)) {
 					d->multidev = 1;
 
-					cmp->aliased_name = malloc(12);
-					sprintf(cmp->aliased_name, "_dev%d", cmp->id);
 					cmp->id = d->id;
 					cmp->name = d->name;
 					cmp->used = 1;
@@ -289,8 +287,6 @@
 		if (ptr->children || ptr->multidev)
 			fprintf(fil, "struct bus %s_links[];\n", ptr->name);
 	}
-	if ((ptr->type == device) && (ptr->id != 0) && ptr->used)
-		fprintf(fil, "static struct device %s;\n", ptr->aliased_name);
 }
 
 static void pass1(FILE *fil, struct device *ptr) {

Modified: trunk/util/sconfig/sconfig.h
==============================================================================
--- trunk/util/sconfig/sconfig.h	Mon Aug  9 14:02:00 2010	(r5686)
+++ trunk/util/sconfig/sconfig.h	Mon Aug  9 14:58:16 2010	(r5687)
@@ -54,7 +54,6 @@
 	int chiph_exists;
 	char *ops;
 	char *name;
-	char *aliased_name;
 	char *name_underscore;
 	char *path;
 	int path_a;




More information about the coreboot mailing list