This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Commit: PR 22823: Fix gcc 8 compile time warnings


Hi Maciej,

>>   dummy functions.  To solve this I chose to create a set of extra dummy
>>   functions which accept a variable number of arguments.  Thus
>>   satisfying the compiler and allowing the build to finish.
> 
>  Unfortunately this has broken LD severely, in a host rather than target 
> dependent manner I believe.

Yikes!  Sorry about that.  For some reason this problem does not show up
on my machine, even when compiling at -O0.  We must be using slightly 
different versions of the compiler.

Please could you try out the attached patch and let me know if it solves
the problem ?

Cheers
  Nick
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index a94de20785..e195a9f0d3 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -55,7 +55,11 @@ bfd_false (bfd *ignore ATTRIBUTE_UNUSED)
 bfd_boolean
 bfd_false_any (bfd *ignore ATTRIBUTE_UNUSED, ...)
 {
+  va_list args;
+
+  va_start (args, ignore);
   bfd_set_error (bfd_error_invalid_operation);
+  va_end (args);
   return FALSE;
 }
 
@@ -91,7 +95,11 @@ bfd_nullvoidptr (bfd *ignore ATTRIBUTE_UNUSED)
 void *
 bfd_nullvoidptr_any (bfd *ignore ATTRIBUTE_UNUSED, ...)
 {
+  va_list args;
+
+  va_start (args, ignore);
   bfd_set_error (bfd_error_invalid_operation);
+  va_end (args);
   return NULL;
 }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]