This is the mail archive of the libc-hacker@sources.redhat.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]
Other format: [Raw text]

Fix warnings


Building glibc produces lots of these warnings:
../include/ctype.h:27: warning: no previous prototype for `__ctype_b_loc'
../include/ctype.h:37: warning: no previous prototype for `__ctype_toupper_loc'
../include/ctype.h:47: warning: no previous prototype for `__ctype_tolower_loc'

And these:
ctype_l.c:28: warning: no previous prototype for `__isalnum_l'
ctype_l.c:29: warning: no previous prototype for `__isalpha_l'
ctype_l.c:30: warning: no previous prototype for `__iscntrl_l'


And also this one:
../sysdeps/posix/spawni.c:278: warning: control reaches end of non-void function

How can we add an  __attribute__ ((noreturn)) to _exit in include/unistd.h?

Ok to commit the appended patch for the ctype warnings?

Andreas

2002-09-17  Andreas Jaeger  <aj@suse.de>

	* ctype/ctype_l.c (func): Add prototype.

	* include/ctype.h: Add prototypes for __ctype_b_loc,
	__ctype_toupper_loc, __ctype_tolower_loc to remove warnings.

============================================================
Index: ctype/ctype_l.c
--- ctype/ctype_l.c	6 Aug 2002 08:39:59 -0000	1.4
+++ ctype/ctype_l.c	17 Sep 2002 16:21:09 -0000
@@ -21,7 +21,8 @@
 
 /* Provide real-function versions of all the ctype macros.  */
 
-#define	func(name, type) \
+#define	func(name, type)						  \
+  extern int __##name (int c, __locale_t l);				  \
   int __##name (int c, __locale_t l) { return __isctype_l (c, type, l); } \
   weak_alias (__##name, name)
 
============================================================
Index: include/ctype.h
--- include/ctype.h	2 Sep 2002 07:08:54 -0000	1.5
+++ include/ctype.h	17 Sep 2002 16:21:09 -0000
@@ -22,6 +22,11 @@ __libc_tsd_define (extern, CTYPE_B)
 __libc_tsd_define (extern, CTYPE_TOUPPER)
 __libc_tsd_define (extern, CTYPE_TOLOWER)
 
+extern const uint16_t ** __attribute__ ((const)) __ctype_b_loc (void);
+extern const int32_t ** __attribute__ ((const)) __ctype_toupper_loc (void);
+extern const int32_t ** __attribute__ ((const)) __ctype_tolower_loc (void);
+     
+
 CTYPE_EXTERN_INLINE const uint16_t ** __attribute__ ((const))
 __ctype_b_loc (void)
 {

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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