Patch attached.

-Corey
Fix flashrom build on 64-bit ubuntu 8.10. Without this patch, ubuntu errors on
unused results. Note that the results are still not used for anything, but this
makes the compiler happy.

Signed-off-by: Corey Osgood <[email protected]>

Index: flashrom.c
===================================================================
--- flashrom.c	(revision 3828)
+++ flashrom.c	(working copy)
@@ -301,7 +301,7 @@
 	FILE *image;
 	/* Probe for up to three flash chips. */
 	struct flashchip *flash, *flashes[3];
-	int opt;
+	int opt, fret;
 	int option_index = 0;
 	int force = 0;
 	int read_it = 0, write_it = 0, erase_it = 0, verify_it = 0;
@@ -517,7 +517,7 @@
 				       exclude_end_position -
 				       exclude_start_position);
 
-			fwrite(buf, sizeof(char), size, image);
+			fret = fwrite(buf, sizeof(char), size, image);
 			fclose(image);
 			printf("done.\n");
 			free(buf);
@@ -615,7 +615,7 @@
 			memset(buf + exclude_start_position, 0,
 			       exclude_end_position - exclude_start_position);
 
-		fwrite(buf, sizeof(char), size, image);
+		fret = fwrite(buf, sizeof(char), size, image);
 		fclose(image);
 		printf("done.\n");
 	} else {
@@ -634,7 +634,7 @@
 			exit(1);
 		}
 
-		fread(buf, sizeof(char), size, image);
+		fret = fread(buf, sizeof(char), size, image);
 		show_id(buf, size, force);
 		fclose(image);
 	}
Index: layout.c
===================================================================
--- layout.c	(revision 3828)
+++ layout.c	(working copy)
@@ -146,7 +146,8 @@
 
 	while (!feof(romlayout)) {
 		char *tstr1, *tstr2;
-		fscanf(romlayout, "%s %s\n", tempstr,
+		int fret;
+		fret = fscanf(romlayout, "%s %s\n", tempstr,
 		       rom_entries[romimages].name);
 #if 0
 		// fscanf does not like arbitrary comments like that :( later
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to