public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Fix warnings
@ 2002-09-17  9:28 Andreas Jaeger
  2002-09-17 13:28 ` Roland McGrath
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Jaeger @ 2002-09-17  9:28 UTC (permalink / raw)
  To: GNU libc hacker


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-09-18  9:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-17  9:28 Fix warnings Andreas Jaeger
2002-09-17 13:28 ` Roland McGrath
2002-09-18  0:00   ` Andreas Jaeger
2002-09-18  0:09     ` Roland McGrath
2002-09-18  2:00       ` Andreas Jaeger
2002-09-18  2:32         ` Roland McGrath

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).