Blame SOURCES/glibc-rh1505492-unused-16.patch

c6d234
commit ad37480c4b79b801b987f5529d036b4e25cac615
c6d234
Author: Martin Sebor <msebor@redhat.com>
c6d234
Date:   Fri Jan 15 10:44:07 2016 -0700
c6d234
c6d234
    Fix build errors with -DNDEBUG.
c6d234
    
c6d234
            [BZ #18755]
c6d234
            * iconv/skeleton.c (FUNCTION_NAME): Suppress -Wunused-but-set-variable
c6d234
            warnings.
c6d234
            * sysdeps/nptl/gai_misc.h (__gai_start_notify_thread): Same.
c6d234
            (__gai_create_helper_thread): Same.
c6d234
            * nscd/nscd.c (do_exit): Suppress -Wunused-variable.
c6d234
            * iconvdata/iso-2022-cn-ext.c (BODY): Initialize local variable
c6d234
            to suppress -Wmaybe-uninitialized warnings.
c6d234
c6d234
Conflicts:
c6d234
	sysdeps/nptl/gai_misc.h
c6d234
c6d234
Not needed due to missing backport of commit
c6d234
74eb826cff5e4277d2d866a92058f27a837f8ff7 (NPTL: Remove gratuitous
c6d234
Linuxisms from gai_misc.h.).  File deleted manually.
c6d234
c6d234
diff --git a/iconv/skeleton.c b/iconv/skeleton.c
c6d234
index 3384d520661f88ed..893fee9aaadf91e3 100644
c6d234
--- a/iconv/skeleton.c
c6d234
+++ b/iconv/skeleton.c
c6d234
@@ -682,7 +682,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
c6d234
 #else
c6d234
 		      /* We have a problem in one of the functions below.
c6d234
 			 Undo the conversion upto the error point.  */
c6d234
-		      size_t nstatus;
c6d234
+		      size_t nstatus __attribute__ ((unused));
c6d234
 
c6d234
 		      /* Reload the pointers.  */
c6d234
 		      *inptrp = inptr;
c6d234
diff --git a/iconvdata/iso-2022-cn-ext.c b/iconvdata/iso-2022-cn-ext.c
c6d234
index bde266811d967192..c86d8616d417f21b 100644
c6d234
--- a/iconvdata/iso-2022-cn-ext.c
c6d234
+++ b/iconvdata/iso-2022-cn-ext.c
c6d234
@@ -426,7 +426,7 @@ enum
c6d234
       }									      \
c6d234
     else								      \
c6d234
       {									      \
c6d234
-	unsigned char buf[2];						      \
c6d234
+	unsigned char buf[2] = { 0, 0 };				      \
c6d234
 	int used;							      \
c6d234
 									      \
c6d234
 	if (set == GB2312_set || ((ann & SO_ann) != CNS11643_1_ann	      \
c6d234
diff --git a/nscd/nscd.c b/nscd/nscd.c
c6d234
index f74a7325ec06e4a6..b088069c0b102846 100644
c6d234
--- a/nscd/nscd.c
c6d234
+++ b/nscd/nscd.c
c6d234
@@ -634,7 +634,8 @@ do_exit (int child_ret, int errnum, const char *format, ...)
c6d234
 {
c6d234
   if (parent_fd != -1)
c6d234
     {
c6d234
-      int ret = write (parent_fd, &child_ret, sizeof (child_ret));
c6d234
+      int ret __attribute__ ((unused));
c6d234
+      ret = write (parent_fd, &child_ret, sizeof (child_ret));
c6d234
       assert (ret == sizeof (child_ret));
c6d234
       close (parent_fd);
c6d234
     }
c6d234
@@ -666,7 +667,8 @@ notify_parent (int child_ret)
c6d234
   if (parent_fd == -1)
c6d234
     return;
c6d234
 
c6d234
-  int ret = write (parent_fd, &child_ret, sizeof (child_ret));
c6d234
+  int ret __attribute__ ((unused));
c6d234
+  ret = write (parent_fd, &child_ret, sizeof (child_ret));
c6d234
   assert (ret == sizeof (child_ret));
c6d234
   close (parent_fd);
c6d234
   parent_fd = -1;