* [PATCH] Kill 4 warnings
@ 2002-07-01 4:48 Jakub Jelinek
2002-07-10 20:00 ` Ulrich Drepper
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2002-07-01 4:48 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
Hi!
Following patch fixes these warnings:
../iconv/skeleton.c:412: warning: unused variable `set'
tst-eof.c:19: warning: unused variable `tm'
tst-eof.c:18: warning: unused variable `ch'
Examples/ex9.c:35: warning: unused variable `th'
BTW: Shouldn't the linuxthreads testcases use test skeleton too, so that
if they hang (which is far more likely than in non-threaded tests) they
will be killed after timeout?
2002-07-01 Jakub Jelinek <jakub@redhat.com>
* libio/tst-eof.c (do_test): Remove unused ch and tm variables.
* iconvdata/iso-2022-jp-3.c (EMIT_SHIFT_TO_INIT): Kill warnings if
-DNDEBUG.
* Examples/ex9.c (main): Remove unused th variable.
--- libc/iconvdata/iso-2022-jp-3.c.jj Mon Jul 1 12:31:43 2002
+++ libc/iconvdata/iso-2022-jp-3.c Mon Jul 1 13:53:09 2002
@@ -109,9 +109,8 @@ enum
{ \
/* Write out the shift sequence before the last \
character. */ \
- int set = data->__statep->__count & CURRENT_SEL_MASK; \
- \
- assert (set == JISX0208_1983_set); \
+ assert ((data->__statep->__count & CURRENT_SEL_MASK) \
+ == JISX0208_1983_set); \
*outbuf++ = ESC; \
*outbuf++ = '$'; \
*outbuf++ = 'B'; \
--- libc/libio/tst-eof.c.jj Tue Jun 25 21:32:08 2002
+++ libc/libio/tst-eof.c Mon Jul 1 13:58:48 2002
@@ -15,8 +15,6 @@ do_test (void)
char *buf;
int fd;
FILE *fp;
- int ch;
- char tm[20];
buf = (char *) malloc (strlen (test_dir) + sizeof "/tst-eof.XXXXXX");
if (buf == NULL)
--- libc/linuxthreads/Examples/ex9.c.jj Mon Jul 1 12:31:53 2002
+++ libc/linuxthreads/Examples/ex9.c Mon Jul 1 14:00:43 2002
@@ -32,7 +32,6 @@ static pthread_barrier_t barrier;
int
main (void)
{
- pthread_t th;
pthread_t thread_list[NUM_THREADS];
int i;
Jakub
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Kill 4 warnings
2002-07-01 4:48 [PATCH] Kill 4 warnings Jakub Jelinek
@ 2002-07-10 20:00 ` Ulrich Drepper
0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Drepper @ 2002-07-10 20:00 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Glibc hackers
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
On Mon, 2002-07-01 at 04:48, Jakub Jelinek wrote:
> Following patch fixes these warnings:
Thanks, I've applied it.
> BTW: Shouldn't the linuxthreads testcases use test skeleton too, so that
> if they hang (which is far more likely than in non-threaded tests) they
> will be killed after timeout?
Ideally, yes.
--
---------------. ,-. 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] 4+ messages in thread
* Re: [PATCH] Kill 4 warnings
2003-07-11 15:07 Jakub Jelinek
@ 2003-07-11 22:50 ` Ulrich Drepper
0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Drepper @ 2003-07-11 22:50 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Roland McGrath, Glibc hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jakub Jelinek wrote:
> 2003-07-11 Jakub Jelinek <jakub@redhat.com>
>
> * sysdeps/unix/sysv/linux/sigwait.c: Include string.h.
> * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.
> * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.
> * sysdeps/unix/sysv/linux/sleep.c (__sleep): Cast value to unsigned
> int before assigning to max to avoid warnings.
Checked in, thanks,
- --
- --------------. ,-. 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/Dz8A2ijCOnn/RHQRAiVwAKCSeyTiwGtJPkkeO064/6l7MEFrhgCeIbcJ
31zccUtfSgQWOociY7Q/3H0=
=8nSr
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Kill 4 warnings
@ 2003-07-11 15:07 Jakub Jelinek
2003-07-11 22:50 ` Ulrich Drepper
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2003-07-11 15:07 UTC (permalink / raw)
To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers
Hi!
2003-07-11 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/sigwait.c: Include string.h.
* sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.
* sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.
* sysdeps/unix/sysv/linux/sleep.c (__sleep): Cast value to unsigned
int before assigning to max to avoid warnings.
--- libc/sysdeps/unix/sysv/linux/sigwait.c.jj 2003-06-17 16:44:31.000000000 -0400
+++ libc/sysdeps/unix/sysv/linux/sigwait.c 2003-07-11 09:56:27.000000000 -0400
@@ -20,6 +20,7 @@
#include <signal.h>
#define __need_NULL
#include <stddef.h>
+#include <string.h>
#include <sysdep-cancel.h>
#include <sys/syscall.h>
--- libc/sysdeps/unix/sysv/linux/sigwaitinfo.c.jj 2003-06-17 16:44:31.000000000 -0400
+++ libc/sysdeps/unix/sysv/linux/sigwaitinfo.c 2003-07-11 10:11:57.000000000 -0400
@@ -20,6 +20,7 @@
#include <signal.h>
#define __need_NULL
#include <stddef.h>
+#include <string.h>
#include <sysdep-cancel.h>
#include <sys/syscall.h>
--- libc/sysdeps/unix/sysv/linux/sigtimedwait.c.jj 2003-06-17 16:44:31.000000000 -0400
+++ libc/sysdeps/unix/sysv/linux/sigtimedwait.c 2003-07-11 10:12:15.000000000 -0400
@@ -18,6 +18,7 @@
#include <errno.h>
#include <signal.h>
+#include <string.h>
#include <sysdep-cancel.h>
#include <sys/syscall.h>
--- libc/sysdeps/unix/sysv/linux/sleep.c.jj 2003-07-11 10:13:54.000000000 -0400
+++ libc/sysdeps/unix/sysv/linux/sleep.c 2003-07-11 10:23:21.000000000 -0400
@@ -40,7 +40,8 @@ cl (void *arg)
unsigned int
__sleep (unsigned int seconds)
{
- const unsigned int max = ((unsigned long int) (~((time_t) 0))) >> 1;
+ const unsigned int max
+ = (unsigned int) (((unsigned long int) (~((time_t) 0))) >> 1);
struct timespec ts;
sigset_t set, oset;
unsigned int result;
Jakub
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-07-11 22:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-01 4:48 [PATCH] Kill 4 warnings Jakub Jelinek
2002-07-10 20:00 ` Ulrich Drepper
2003-07-11 15:07 Jakub Jelinek
2003-07-11 22:50 ` 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).