Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix build errors with -DNDEBUG.
        [BZ #18755]
        * iconv/skeleton.c (FUNCTION_NAME): Suppress -Wunused-but-set-variable
        warnings.
        * sysdeps/nptl/gai_misc.h (__gai_start_notify_thread): Same.
        (__gai_create_helper_thread): Same.
        * nscd/nscd.c (do_exit): Suppress -Wunused-variable.
        * iconvdata/iso-2022-cn-ext.c (BODY): Initialize local variable
        to suppress -Wmaybe-uninitialized warnings.
  • Loading branch information
Martin Sebor committed Jan 15, 2016
1 parent 0924537 commit ad37480
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
@@ -1,3 +1,14 @@
2016-01-15 Martin Sebor <msebor@redhat.com>

[BZ #18755]
* iconv/skeleton.c (FUNCTION_NAME): Suppress -Wunused-but-set-variable
warnings.
* sysdeps/nptl/gai_misc.h (__gai_start_notify_thread): Same.
(__gai_create_helper_thread): Same.
* nscd/nscd.c (do_exit): Suppress -Wunused-variable.
* iconvdata/iso-2022-cn-ext.c (BODY): Initialize local variable
to suppress -Wmaybe-uninitialized warnings.

2016-01-15 H.J. Lu <hongjiu.lu@intel.com> 2016-01-15 H.J. Lu <hongjiu.lu@intel.com>


[BZ #19465] [BZ #19465]
Expand Down
2 changes: 1 addition & 1 deletion iconv/skeleton.c
Expand Up @@ -675,7 +675,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
#else #else
/* We have a problem in one of the functions below. /* We have a problem in one of the functions below.
Undo the conversion upto the error point. */ Undo the conversion upto the error point. */
size_t nstatus; size_t nstatus __attribute__ ((unused));


/* Reload the pointers. */ /* Reload the pointers. */
*inptrp = inptr; *inptrp = inptr;
Expand Down
2 changes: 1 addition & 1 deletion iconvdata/iso-2022-cn-ext.c
Expand Up @@ -426,7 +426,7 @@ enum
} \ } \
else \ else \
{ \ { \
unsigned char buf[2]; \ unsigned char buf[2] = { 0, 0 }; \
int used; \ int used; \
\ \
if (set == GB2312_set || ((ann & SO_ann) != CNS11643_1_ann \ if (set == GB2312_set || ((ann & SO_ann) != CNS11643_1_ann \
Expand Down
6 changes: 4 additions & 2 deletions nscd/nscd.c
Expand Up @@ -659,7 +659,8 @@ do_exit (int child_ret, int errnum, const char *format, ...)
{ {
if (parent_fd != -1) if (parent_fd != -1)
{ {
int ret = write (parent_fd, &child_ret, sizeof (child_ret)); int ret __attribute__ ((unused));
ret = write (parent_fd, &child_ret, sizeof (child_ret));
assert (ret == sizeof (child_ret)); assert (ret == sizeof (child_ret));
close (parent_fd); close (parent_fd);
} }
Expand Down Expand Up @@ -691,7 +692,8 @@ notify_parent (int child_ret)
if (parent_fd == -1) if (parent_fd == -1)
return; return;


int ret = write (parent_fd, &child_ret, sizeof (child_ret)); int ret __attribute__ ((unused));
ret = write (parent_fd, &child_ret, sizeof (child_ret));
assert (ret == sizeof (child_ret)); assert (ret == sizeof (child_ret));
close (parent_fd); close (parent_fd);
parent_fd = -1; parent_fd = -1;
Expand Down
6 changes: 4 additions & 2 deletions sysdeps/nptl/gai_misc.h
Expand Up @@ -81,7 +81,8 @@ __gai_start_notify_thread (void)
{ {
sigset_t ss; sigset_t ss;
sigemptyset (&ss); sigemptyset (&ss);
int sigerr = pthread_sigmask (SIG_SETMASK, &ss, NULL); int sigerr __attribute__ ((unused));
sigerr = pthread_sigmask (SIG_SETMASK, &ss, NULL);
assert_perror (sigerr); assert_perror (sigerr);
} }


Expand All @@ -105,7 +106,8 @@ __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
sigset_t ss; sigset_t ss;
sigset_t oss; sigset_t oss;
sigfillset (&ss); sigfillset (&ss);
int sigerr = pthread_sigmask (SIG_SETMASK, &ss, &oss); int sigerr __attribute__ ((unused));
sigerr = pthread_sigmask (SIG_SETMASK, &ss, &oss);
assert_perror (sigerr); assert_perror (sigerr);


int ret = pthread_create (threadp, &attr, tf, arg); int ret = pthread_create (threadp, &attr, tf, arg);
Expand Down

0 comments on commit ad37480

Please sign in to comment.