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 a number of warnings



On x86-64 cross builds and on x86 native builds I got these (and
similar) warnings which the appended patch fixes:

../sysdeps/wordsize-32/divdi3.c:272: warning: no previous prototype for `__divdi3'
../sysdeps/wordsize-32/divdi3.c:294: warning: no previous prototype for `__moddi3'
../sysdeps/wordsize-32/divdi3.c:316: warning: no previous prototype for `__udivdi3'
../sysdeps/wordsize-32/divdi3.c:322: warning: no previous prototype for `__umoddi3'
../linuxthreads/sysdeps/i386/i686/pt-machine.h:38: warning: no previous prototype for `testandset'
../linuxthreads/sysdeps/i386/i686/pt-machine.h:56: warning: no previous prototype for `__compare_and_swap'
td_thr_set_event.c:34: warning: implicit declaration of function `__libc_write'
error.c:201: warning: implicit declaration of function `_IO_putc_internal'

Ok to commit?

Andreas

2002-03-03  Andreas Jaeger  <aj@suse.de>

	* sysdeps/wordsize-32/divdi3.c: Add prototypes to avoid warnings.

	* misc/error.c [_LIBC]: Include libioP.h for prototype of
	_IO_putc_internal.

	* linuxthreads_db/thread_dbP.h: Include <unistd.h> for prototypes
	of __libc_write.

For linuxthreads:
	* sysdeps/i386/tls.h: Include <internals.h> for prototypes.

============================================================
Index: misc/error.c
--- misc/error.c	2002/02/26 01:43:53	1.29
+++ misc/error.c	2002/03/03 14:09:15
@@ -74,6 +74,7 @@ unsigned int error_message_count;
 
 # define program_name program_invocation_name
 # include <errno.h>
+# include <libio/libioP.h>
 
 /* In GNU libc we want do not want to use the common name `error' directly.
    Instead make it a weak alias.  */
============================================================
Index: linuxthreads/sysdeps/i386/tls.h
--- linuxthreads/sysdeps/i386/tls.h	2002/02/24 04:56:52	1.9
+++ linuxthreads/sysdeps/i386/tls.h	2002/03/03 14:09:15
@@ -21,7 +21,7 @@
 #define _TLS_H
 
 #include <stddef.h>
-
+#include <internals.h>
 #include <pt-machine.h>
 
 /* Type for the dtv.  */
============================================================
Index: sysdeps/wordsize-32/divdi3.c
--- sysdeps/wordsize-32/divdi3.c	2002/02/28 19:36:29	1.1
+++ sysdeps/wordsize-32/divdi3.c	2002/03/03 14:09:15
@@ -50,6 +50,12 @@ struct DWstruct { Wtype low, high;};
 #endif
 typedef union { struct DWstruct s; DWtype ll; } DWunion;
 
+/* Prototypes of exported functions.  */
+extern DWtype __divdi3 (DWtype u, DWtype v);
+extern DWtype __moddi3 (DWtype u, DWtype v);
+extern UDWtype __udivdi3 (UDWtype u, UDWtype v);
+extern UDWtype __umoddi3 (UDWtype u, UDWtype v);
+
 static UDWtype
 __udivmoddi4 (UDWtype n, UDWtype d, UDWtype *rp)
 {
============================================================
Index: linuxthreads_db/thread_dbP.h
--- linuxthreads_db/thread_dbP.h	2002/02/05 00:50:51	1.10
+++ linuxthreads_db/thread_dbP.h	2002/03/03 14:09:15
@@ -3,6 +3,7 @@
 #define _THREAD_DBP_H	1
 
 #include <string.h>
+#include <unistd.h>
 #include "proc_service.h"
 #include "thread_db.h"
 #include "../linuxthreads/descr.h"

-- 
 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]