* binutils warning fixes
@ 2005-02-17 17:10 Alan Modra
2005-02-17 17:59 ` Alan Modra
0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2005-02-17 17:10 UTC (permalink / raw)
To: binutils
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: binutils warning fixes
2005-02-17 17:10 binutils warning fixes Alan Modra
@ 2005-02-17 17:59 ` Alan Modra
0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2005-02-17 17:59 UTC (permalink / raw)
To: binutils
On Thu, Feb 17, 2005 at 11:28:32PM +1030, Alan Modra wrote:
> 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.
Oops, missed most of the diff. Here's the rest.
Index: binutils/deflex.l
===================================================================
RCS file: /cvs/src/src/binutils/deflex.l,v
retrieving revision 1.7
diff -u -p -r1.7 deflex.l
--- binutils/deflex.l 8 Mar 2004 11:50:36 -0000 1.7
+++ binutils/deflex.l 17 Feb 2005 11:14:22 -0000
@@ -27,6 +27,8 @@
#include "defparse.h"
#include "dlltool.h"
+#define YY_NO_UNPUT
+
int linenumber;
%}
Index: binutils/rclex.l
===================================================================
RCS file: /cvs/src/src/binutils/rclex.l,v
retrieving revision 1.10
diff -u -p -r1.10 rclex.l
--- binutils/rclex.l 14 Sep 2003 12:20:16 -0000 1.10
+++ binutils/rclex.l 17 Feb 2005 11:14:26 -0000
@@ -32,6 +32,8 @@
#include <assert.h>
+#define YY_NO_UNPUT
+
/* Whether we are in rcdata mode, in which we returns the lengths of
strings. */
Index: binutils/rcparse.y
===================================================================
RCS file: /cvs/src/src/binutils/rcparse.y,v
retrieving revision 1.20
diff -u -p -r1.20 rcparse.y
--- binutils/rcparse.y 17 Jan 2005 16:24:12 -0000 1.20
+++ binutils/rcparse.y 17 Feb 2005 11:14:26 -0000
@@ -54,10 +54,11 @@ static unsigned long base_style;
static unsigned long default_style;
static unsigned long class;
static struct res_id res_text_field;
+static unichar null_unichar;
/* This is used for COMBOBOX, LISTBOX and EDITTEXT which
do not allow resource 'text' field in control definition. */
-static const struct res_id res_null_text = { 1, {{0, L""}}};
+static const struct res_id res_null_text = { 1, {{0, &null_unichar}}};
%}
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-17 13:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-17 17:10 binutils warning fixes Alan Modra
2005-02-17 17:59 ` Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).