[PATCH] GCC Warnings patrol
Ryan T. Sammartino
ryants@shaw.ca
Sun Feb 24 18:15:00 GMT 2002
Well, I followed the advice for "beginning GCC hackers" and went after
a few warnings fixes. As a beginner GCC hacker, if this isn't accepted,
I'd appreciate an explanation as to why so that I can do better next
time. Thanks.
2002-02-24 Ryan T. Sammartino <ryants@shaw.ca>
* emit-rtl.c (gen_const_vector_0): get rid of "unused variable
`type'" warning
* fixinc/gnu-regex.c: fix re-definition of _GNU_SOURCE warning
* fixinc/gnu-regex.c (init_syntax_once): fix 'declaration is not a
prototype' warning.
Index: emit-rtl.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.249
diff -c -3 -p -b -r1.249 emit-rtl.c
*** emit-rtl.c 21 Feb 2002 23:06:14 -0000 1.249
--- emit-rtl.c 25 Feb 2002 01:03:48 -0000
*************** gen_const_vector_0 (type, mode)
*** 4812,4817 ****
--- 4812,4819 ----
rtvec v;
int units, i;
enum machine_mode inner;
+
+ (void)type;
units = GET_MODE_NUNITS (mode);
inner = GET_MODE_INNER (mode);
Index: fixinc/gnu-regex.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/fixinc/gnu-regex.c,v
retrieving revision 1.14
diff -c -3 -p -b -r1.14 gnu-regex.c
*** fixinc/gnu-regex.c 12 Sep 2001 17:18:03 -0000 1.14
--- fixinc/gnu-regex.c 25 Feb 2002 01:03:52 -0000
***************
*** 22,34 ****
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
- #undef _GNU_SOURCE
- #define _GNU_SOURCE
-
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
/* GCC LOCAL: we don't need NLS here. */
#undef ENABLE_NLS
/* GCC LOCAL: to handle defining alloca. */
--- 22,35 ----
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
+ #ifndef _GNU_SOURCE
+ # define _GNU_SOURCE
+ #endif
+
/* GCC LOCAL: we don't need NLS here. */
#undef ENABLE_NLS
/* GCC LOCAL: to handle defining alloca. */
*************** extern char *re_syntax_table;
*** 155,160 ****
--- 156,163 ----
# else /* not SYNTAX_TABLE */
static char re_syntax_table[CHAR_SET_SIZE];
+
+ static void init_syntax_once PARAMS ((void));
static void
init_syntax_once ()
--
Ryan T. Sammartino
http://members.shaw.ca/ryants/
Patriotism is the virtue of the vicious.
-- Oscar Wilde
More information about the Gcc-patches
mailing list