At least with my configuration gcc 4.6.0 complains about the initialisation
but non-use of hasdebug in coff_write_object_contents (defined in
bfd/coffcode.h). Since -Werror is in effect this stops the build.

The attached oatch fixes this problem by adding hasdebug=hasdebug; if the
only use of hasdebug fails to appear due to the preprocessor switches in
effect.

IMHO a function of this size needs a very good excuse to hide in a *.h file
instead of a *.c file but that might just be my coding style.

Duncan (-:

--- bfd/coffcode.h.dist 2010-05-09 15:09:25.940003506 +0100
+++ bfd/coffcode.h      2010-05-10 09:39:11.680021412 +0100
@@ -3957,6 +3957,8 @@
     internal_f.f_flags |= IMAGE_FILE_DEBUG_STRIPPED;
   if (pe_data (abfd)->real_flags & IMAGE_FILE_LARGE_ADDRESS_AWARE)
     internal_f.f_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
+#else
+  hasdebug=hasdebug;           /* Stop compiler warning */
 #endif

 #ifndef COFF_WITH_pex64


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to