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]

binutils warning fixes


Fixes a number of warnings.  I guess the only thing that needs
explaining is why moving assert.h and time.h before getopt.h matters.
The reason is that include/getopt.h gives a getopt() a prototype if
__GNU_LIBRRY__ is defined, which we get via the system headers.  Which
I guess only kills the lack of prototype warning on systems using
glibc.  So I decided to also include unistd.h, which should provide
getopt() too.

binutils/
	* deflex.l (YY_NO_UNPUT): Define.
	* rclex.l (YY_NO_UNPUT): Define.
	* rcparse.y (null_unichar): New static var.
	(res_null_text): Use it rather than attempting to init from wchar_t.
	* windres.c <assert.h, time.h>: Include before getopt.h.
	Include config.h and unistd.h too.

Index: binutils/windres.c
===================================================================
RCS file: /cvs/src/src/binutils/windres.c,v
retrieving revision 1.21
diff -u -p -r1.21 windres.c
--- binutils/windres.c	18 Oct 2004 14:04:40 -0000	1.21
+++ binutils/windres.c	17 Feb 2005 12:56:57 -0000
@@ -34,6 +34,12 @@
 
    * The res2coff program, written by Pedro A. Aranda <paag@tid.es>.  */
 
+#include "config.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <assert.h>
+#include <time.h>
 #include "bfd.h"
 #include "getopt.h"
 #include "bucomm.h"
@@ -41,8 +47,6 @@
 #include "safe-ctype.h"
 #include "obstack.h"
 #include "windres.h"
-#include <assert.h>
-#include <time.h>
 
 /* Used by resrc.c at least.  */
 

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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