public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Fix a number of warnings
@ 2002-03-03  7:14 Andreas Jaeger
  2002-03-03 10:32 ` Ulrich Drepper
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Jaeger @ 2002-03-03  7:14 UTC (permalink / raw)
  To: GNU libc hacker


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

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

* Re: Fix a number of warnings
  2002-03-03  7:14 Fix a number of warnings Andreas Jaeger
@ 2002-03-03 10:32 ` Ulrich Drepper
  2002-03-03 11:37   ` Andreas Jaeger
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Drepper @ 2002-03-03 10:32 UTC (permalink / raw)
  To: Andreas Jaeger; +Cc: GNU libc hacker

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

On Sun, 2002-03-03 at 06:49, Andreas Jaeger wrote:

> Ok to commit?

Yes.  But...

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

linuxthread_db also has its own ChangeLog file.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

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

* Re: Fix a number of warnings
  2002-03-03 10:32 ` Ulrich Drepper
@ 2002-03-03 11:37   ` Andreas Jaeger
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Jaeger @ 2002-03-03 11:37 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: GNU libc hacker

Ulrich Drepper <drepper@redhat.com> writes:

> On Sun, 2002-03-03 at 06:49, Andreas Jaeger wrote:
>
>> Ok to commit?
>
> Yes.  But...

I'll add it together with some other patches (complete patchset
appended) - but without the linuxthreads patch.  That one didn't solve
all the issues, I need some more time to decide what's the right thing
to do.

>> 	* linuxthreads_db/thread_dbP.h: Include <unistd.h> for prototypes
>> 	of __libc_write.
>
> linuxthread_db also has its own ChangeLog file.

Ok,

Andreas

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

	* elf/nodlopenmod2.c: Provide prototype to avoid warning.

	* posix/regcomp.c: Get regex.h from include for internal prototypes.

	* sysdeps/unix/sysv/linux/init-first.c: Move __init_misc prototype
	to libc-internal.h and include it.

	* misc/init-misc.c: Include libc-internal.h for prototypes.

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

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

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

For linuxthreads:
	* errno.c: Include resolv.h.

============================================================
Index: elf/nodlopenmod2.c
--- elf/nodlopenmod2.c	10 Feb 2002 22:30:55 -0000	1.1
+++ elf/nodlopenmod2.c	3 Mar 2002 17:08:09 -0000
@@ -1,5 +1,7 @@
 extern int a;
 
+extern int foo (void);
+
 int
 foo (void)
 {
============================================================
Index: elf/tst-tlsmod1.c
--- elf/tst-tlsmod1.c	14 Feb 2002 07:50:30 -0000	1.3
+++ elf/tst-tlsmod1.c	3 Mar 2002 16:37:20 -0000
@@ -12,6 +12,7 @@ VAR_INT_DEF(bar);
 VAR_INT_DECL(baz);
 #endif
 
+extern int in_dso (void);
 
 int
 in_dso (void)
============================================================
Index: include/libc-internal.h
--- include/libc-internal.h	23 Apr 2001 18:46:25 -0000	1.4
+++ include/libc-internal.h	3 Mar 2002 15:53:54 -0000
@@ -26,4 +26,7 @@ extern hp_timing_t __get_clockfreq (void
 /* Free all allocated resources.  */
 extern void __libc_freeres (void);
 
+/* Define and initialize `__progname' et. al.  */
+extern void __init_misc (int, char **, char **);
+
 #endif /* _LIBC_INTERNAL  */
============================================================
Index: linuxthreads/errno.c
--- linuxthreads/errno.c	4 Dec 1999 17:58:58 -0000	1.3
+++ linuxthreads/errno.c	3 Mar 2002 16:27:33 -0000
@@ -16,6 +16,7 @@
 
 #include <errno.h>
 #include <netdb.h>
+#include <resolv.h>
 #include "pthread.h"
 #include "internals.h"
 
============================================================
Index: linuxthreads_db/thread_dbP.h
--- linuxthreads_db/thread_dbP.h	5 Feb 2002 00:50:51 -0000	1.10
+++ linuxthreads_db/thread_dbP.h	3 Mar 2002 14:06:01 -0000
@@ -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"
============================================================
Index: misc/error.c
--- misc/error.c	26 Feb 2002 01:43:53 -0000	1.29
+++ misc/error.c	3 Mar 2002 14:06:01 -0000
@@ -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: misc/init-misc.c
--- misc/init-misc.c	23 Feb 2002 08:46:24 -0000	1.11
+++ misc/init-misc.c	3 Mar 2002 15:52:34 -0000
@@ -18,6 +18,7 @@
    02111-1307 USA.  */
 
 #include <string.h>
+#include <libc-internal.h>
 
 char *__progname_full = (char *) "";
 char *__progname = (char *) "";
============================================================
Index: posix/regcomp.c
--- posix/regcomp.c	3 Mar 2002 18:17:58 -0000	1.3
+++ posix/regcomp.c	3 Mar 2002 19:27:16 -0000
@@ -54,7 +54,7 @@
 # define gettext_noop(String) String
 #endif
 
-#include "regex.h"
+#include <regex.h>
 #include "regex_internal.h"
 
 static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
============================================================
Index: sysdeps/unix/sysv/linux/init-first.c
--- sysdeps/unix/sysv/linux/init-first.c	24 Feb 2002 08:27:39 -0000	1.41
+++ sysdeps/unix/sysv/linux/init-first.c	3 Mar 2002 15:53:08 -0000
@@ -33,8 +33,6 @@
 # include "dl-osinfo.h"
 #endif
 
-extern void __init_misc (int, char **, char **);
-
 /* The function is called from assembly stubs the compiler can't see.  */
 static void init (int, char **, char **) __attribute__ ((unused));
 
============================================================
Index: sysdeps/wordsize-32/divdi3.c
--- sysdeps/wordsize-32/divdi3.c	28 Feb 2002 19:36:29 -0000	1.1
+++ sysdeps/wordsize-32/divdi3.c	3 Mar 2002 14:06:01 -0000
@@ -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)
 {

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

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

end of thread, other threads:[~2002-03-03 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-03  7:14 Fix a number of warnings Andreas Jaeger
2002-03-03 10:32 ` Ulrich Drepper
2002-03-03 11:37   ` Andreas Jaeger

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