Hi,
ubuntu's current gcc (version 4.3.2) has some extra warnings, thus
compiling binutils (build-cegcc.sh) with -Werror enabled by default fails.
Attached is a simple patch making binutils compile.
Cheers
Klaus
Index: binutils/binutils/dlltool.c
===================================================================
--- binutils/binutils/dlltool.c (revision 1202)
+++ binutils/binutils/dlltool.c (working copy)
@@ -1206,7 +1206,7 @@
if (pid == -1)
{
- inform (strerror (errno));
+ inform (_("%s"), strerror (errno));
fatal (errmsg_fmt, errmsg_arg);
}
@@ -1985,6 +1985,8 @@
long *copy;
int j;
int on_page;
+ long ret;
+
fprintf (f, "\t.section\t.init\n");
fprintf (f, "lab:\n");
@@ -1992,7 +1994,10 @@
numbytes = ftell (base_file);
fseek (base_file, 0, SEEK_SET);
copy = xmalloc (numbytes);
- fread (copy, 1, numbytes, base_file);
+ ret = fread (copy, 1, numbytes, base_file);
+ if(ret < numbytes)
+ fatal(_("Short read\n"));
+
num_entries = numbytes / sizeof (long);
Index: binutils/binutils/windmc.c
===================================================================
--- binutils/binutils/windmc.c (revision 1202)
+++ binutils/binutils/windmc.c (working copy)
@@ -1137,6 +1137,7 @@
rc_uint_type ul;
char *buff;
long flen;
+ long ret;
FILE *fp = fopen (input_filename, "rb");
if (!fp)
@@ -1147,7 +1148,9 @@
fseek (fp, 0, SEEK_SET);
buff = malloc (flen + 3);
memset (buff, 0, flen + 3);
- fread (buff, 1, flen, fp);
+ ret = fread (buff, 1, flen, fp);
+ if(ret < flen)
+ fatal (_("Short read\n"));
fclose (fp);
if (mcset_text_in_is_unicode != 1)
{
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Cegcc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cegcc-devel