[committed] fix new warning in symbols.c

Eric Christopher echristo@redhat.com
Sun Apr 10 23:41:00 GMT 2005


Alan's recent patch to fix gas/827 trips a warning under gcc4 on
symbols.c. Adding the cast fixes the problem trivially.

tested by building mipsisa64-elf gas and running make check.

committed.

-eric

ps. Alan, are you sure you had that entry right?

2005-04-10  Eric Christopher  <echristo@redhat.com>

        * symbols.c (symbol_X_add_number): Fix warning.

Index: symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.57
diff -u -p -w -r1.57 symbols.c
--- symbols.c	9 Apr 2005 03:48:09 -0000	1.57
+++ symbols.c	10 Apr 2005 23:27:48 -0000
@@ -2032,7 +2032,7 @@ symbol_X_add_number (symbolS *s)
     return &((struct local_symbol *) s)->lsy_value;
 #endif
 
-  return &s->sy_value.X_add_number;
+  return (valueT *)&s->sy_value.X_add_number;
 }
 
 /* Set the value of SYM to the current position in the current segment.
*/




More information about the Binutils mailing list