[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Warning build bfd library wiht gcc 4.6.0+fix
From: |
Duncan Simpson |
Subject: |
Warning build bfd library wiht gcc 4.6.0+fix |
Date: |
Mon, 10 May 2010 10:01:21 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.24 (X11/20100329) |
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
- Warning build bfd library wiht gcc 4.6.0+fix,
Duncan Simpson <=