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]

[PATCH] Kill 4 warnings


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]