This is the mail archive of the binutils@sources.redhat.com 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]

[RFA] Fix compilation warning in libiberty.h


Hello,

I noticed that the compiler emits a warning when building bfd.c
in libiberty.h. The compiler we are using is GNAT Pro based on
GCC 3.4.4. Here is the warning we get:

gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -D_GNU_SOURCE -I. -I.././bfd -I.././bfd/../include -I.././bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c bfd.c -o bfd.o
In file included from bfd.c:209:
.././bfd/../include/libiberty.h:80: warning: function declaration isn't a prototype

The problem is that this breaks the build because of the -Werror.

I think the problem is that the prototype is missing a ``void'' keyword.
This fixes the warning. The trouble I had was whether I wanted to use
the PARAMS macro or not. I seem to remember that we wanted to get away
from them, but then the rest of the file uses it. I kept it for now,
for better consistency.

Joel Brobecker  <brobecker@adacore.com>

        * include/libiberty.h,v (basename): Fix prototype definition.

Tested by building GDB on sparc-solaris 2.8.
OK to apply?

Thanks,
-- 
Joel

Attachment: libiberty.h.diff
Description: Text document


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