public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: binutils@sources.redhat.com
Subject: binutils warning fixes
Date: Thu, 17 Feb 2005 17:10:00 -0000	[thread overview]
Message-ID: <20050217125832.GZ10128@bubble.modra.org> (raw)

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

             reply	other threads:[~2005-02-17 12:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-17 17:10 Alan Modra [this message]
2005-02-17 17:59 ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050217125832.GZ10128@bubble.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).