* [PATCH] Warning fixes
@ 2004-08-19 10:32 Jakub Jelinek
2004-08-19 18:57 ` Ulrich Drepper
0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2004-08-19 10:32 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
Hi!
../sysdeps/posix/getaddrinfo.c: In function `gaih_inet':
../sysdeps/posix/getaddrinfo.c:859: warning: assignment discards qualifiers from pointer target type
nss_dns/dns-canon.c: In function `_nss_dns_getcanonname_r':
nss_dns/dns-canon.c:55: warning: 'status' might be used uninitialized in this function
The former is because ai_canonname is char *, while canon is const char *.
No idea if char * ai_canonname is in the standard just for historical
reasons or if it actually ought to be writable.
The latter sounds like a bug, if both A and AAAA queries fail,
_nss_dns_getcanonname_r would return the unitialized status value,
so with bad luck it could be NSS_STATUS_SUCCESS which is the only value
the caller cares about.
2004-08-19 Jakub Jelinek <jakub@redhat.com>
* sysdeps/posix/getaddrinfo.c (gaih_inet): Cast canon to (char *)
to avoid warning.
* resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Initialize
status to NSS_STATUS_UNAVAIL.
--- libc/sysdeps/posix/getaddrinfo.c.jj 2004-08-19 12:18:26.000000000 +0200
+++ libc/sysdeps/posix/getaddrinfo.c 2004-08-19 12:22:23.251899931 +0200
@@ -856,7 +856,7 @@ gaih_inet (const char *name, const struc
(*pai)->ai_addr = (void *) (*pai + 1);
/* We only add the canonical name once. */
- (*pai)->ai_canonname = canon;
+ (*pai)->ai_canonname = (char *) canon;
canon = NULL;
#if SALEN
--- libc/resolv/nss_dns/dns-canon.c.jj 2004-08-16 19:13:13.000000000 +0200
+++ libc/resolv/nss_dns/dns-canon.c 2004-08-19 12:24:36.573339586 +0200
@@ -52,7 +52,7 @@ _nss_dns_getcanonname_r (const char *nam
querybuf *buf;
unsigned char *ptr;
} ansp = { .ptr = buf };
- enum nss_status status;
+ enum nss_status status = NSS_STATUS_UNAVAIL;
int qtypes[] = { ns_t_a, ns_t_aaaa };
#define nqtypes (sizeof (qtypes) / sizeof (qtypes[0]))
Jakub
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Warning fixes
2004-08-19 10:32 [PATCH] Warning fixes Jakub Jelinek
@ 2004-08-19 18:57 ` Ulrich Drepper
0 siblings, 0 replies; 5+ messages in thread
From: Ulrich Drepper @ 2004-08-19 18:57 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Glibc hackers
Applied.
--
⧠Ulrich Drepper ⧠Red Hat, Inc. ⧠444 Castro St ⧠Mountain View, CA â
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Warning fixes
@ 2005-01-27 17:47 Jakub Jelinek
0 siblings, 0 replies; 5+ messages in thread
From: Jakub Jelinek @ 2005-01-27 17:47 UTC (permalink / raw)
To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers
Hi!
BTW, Roland, you checked in
2005-01-25 Roland McGrath <roland@redhat.com>
* sysdeps/generic/syslog.c [NO_SIGPIPE]: Protect sigpipe_handler decl.
ChangeLog entry but not the actual syslog.c change to shut up that warning.
2005-01-27 Jakub Jelinek <jakub@redhat.com>
* stdlib/tst-fmtmsg.c: Include stdlib.h.
* stdio-common/tst-fmemopen2.c: Include string.h.
--- libc/stdlib/tst-fmtmsg.c.jj 2005-01-26 18:22:23.000000000 +0100
+++ libc/stdlib/tst-fmtmsg.c 2005-01-27 18:10:44.184372575 +0100
@@ -1,6 +1,7 @@
#include <fmtmsg.h>
#include <mcheck.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
--- libc/stdio-common/tst-fmemopen2.c.jj 2005-01-06 03:08:27.000000000 +0100
+++ libc/stdio-common/tst-fmemopen2.c 2005-01-27 18:41:32.625070471 +0100
@@ -1,5 +1,6 @@
#include <assert.h>
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
Jakub
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Warning fixes
2003-01-14 0:12 Jakub Jelinek
@ 2003-01-14 1:24 ` Ulrich Drepper
0 siblings, 0 replies; 5+ messages in thread
From: Ulrich Drepper @ 2003-01-14 1:24 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Roland McGrath, Glibc hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jakub Jelinek wrote:
> INLINE_SYSCALL is already defined in sysdeps/unix/sysdep.h, so needs to be
> undefined first to avoid warnings.
> Similarly, JUMPTARGET is now defined in sysdeps/generic/sysdep.h, so there
> is no need to define it again in vfork.S.
Thanks, I've applied the patch.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+I2bQ2ijCOnn/RHQRAm8zAKCZZYSFnaLlDBJMoO1zto7ukRFEOgCfb20Z
7aU7rRMf048dmOy5tlkFp14=
=Dqus
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Warning fixes
@ 2003-01-14 0:12 Jakub Jelinek
2003-01-14 1:24 ` Ulrich Drepper
0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2003-01-14 0:12 UTC (permalink / raw)
To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers
Hi!
INLINE_SYSCALL is already defined in sysdeps/unix/sysdep.h, so needs to be
undefined first to avoid warnings.
Similarly, JUMPTARGET is now defined in sysdeps/generic/sysdep.h, so there
is no need to define it again in vfork.S.
2003-01-14 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL): Undefined before
defining.
linuxthreads/
* sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
--- libc/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S.jj 2003-01-09 21:27:42.000000000 +0100
+++ libc/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S 2003-01-14 01:07:52.000000000 +0100
@@ -21,8 +21,6 @@
#define _SIGNAL_H
#include <bits/signum.h>
-#define JUMPTARGET(name) name
-
/* The following are defined in linux/sched.h, which unfortunately */
/* is not safe for inclusion in an assembly file. */
#define CLONE_VM 0x00000100 /* set if VM shared between processes */
--- libc/sysdeps/unix/alpha/sysdep.h.jj 2003-01-13 13:57:37.000000000 +0100
+++ libc/sysdeps/unix/alpha/sysdep.h 2003-01-14 01:06:45.000000000 +0100
@@ -129,6 +129,7 @@ $syscall_error: \
/* ??? Linux needs to be able to override INLINE_SYSCALL for one
particular special case. Make this easy. */
+#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
INLINE_SYSCALL1(name, nr, args)
Jakub
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-01-27 17:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-19 10:32 [PATCH] Warning fixes Jakub Jelinek
2004-08-19 18:57 ` Ulrich Drepper
-- strict thread matches above, loose matches on Subject: below --
2005-01-27 17:47 Jakub Jelinek
2003-01-14 0:12 Jakub Jelinek
2003-01-14 1:24 ` Ulrich Drepper
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).