This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Some warnings fixed



FYI: I've commited the appended patch to fix these warnings:

fnmatch_loop.c:383: warning: unused variable `len'
../sysdeps/generic/rawmemchr.c: In function `__rawmemchr':
../sysdeps/generic/rawmemchr.c:93: warning: implicit declaration of function `abort'
../sysdeps/generic/strchrnul.c: In function `__strchrnul':
../sysdeps/generic/strchrnul.c:69: warning: implicit declaration of function `abort'

Andreas

2000-07-05  Andreas Jaeger  <aj@suse.de>

	* posix/fnmatch_loop.c (FCT): Only declare len if
	!WIDE_CHAR_VERSION to silence GCC.

	* sysdeps/generic/rawmemchr.c: Include <stdlib.h> for abort
	prototype.
	* sysdeps/generic/strchrnul.c: Likewise.

============================================================
Index: posix/fnmatch_loop.c
--- posix/fnmatch_loop.c	2000/07/04 23:26:24	1.9
+++ posix/fnmatch_loop.c	2000/07/05 13:17:31
@@ -380,7 +380,9 @@
 			    /* We found a table entry.  Now see whether the
 			       character we are currently at has the same
 			       equivalance class value.  */
+# if !WIDE_CHAR_VERSION
 			    int len = weights[idx];
+# endif
 			    int32_t idx2;
 			    const UCHAR *np = (const UCHAR *) n;
 
============================================================
Index: sysdeps/generic/rawmemchr.c
--- sysdeps/generic/rawmemchr.c	1999/06/14 09:25:07	1.2
+++ sysdeps/generic/rawmemchr.c	2000/07/05 13:17:31
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991,93,96,97,99,2000 Free Software Foundation, Inc.
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
    with help from Dan Sahlin (dan@sics.se) and
    commentary by Jim Blandy (jimb@ai.mit.edu);
@@ -34,6 +34,7 @@
 #if defined (_LIBC)
 # include <string.h>
 # include <memcopy.h>
+# include <stdlib.h>
 #else
 # define reg_char char
 #endif
============================================================
Index: sysdeps/generic/strchrnul.c
--- sysdeps/generic/strchrnul.c	1999/06/14 09:25:09	1.2
+++ sysdeps/generic/strchrnul.c	2000/07/05 13:17:31
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 93, 94, 95, 96, 97, 99 Free Software Foundation, Inc.
+/* Copyright (C) 1991,93,94,95,96,97,99,2000 Free Software Foundation, Inc.
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
    with help from Dan Sahlin (dan@sics.se) and
    bug fix and commentary by Jim Blandy (jimb@ai.mit.edu);
@@ -22,6 +22,7 @@
 
 #include <string.h>
 #include <memcopy.h>
+#include <stdlib.h>
 
 #undef __strchrnul
 #undef strchrnul

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de

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