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

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