bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/2] silence some mingw warnings


From: Eric Blake
Subject: [PATCH 0/2] silence some mingw warnings
Date: Wed, 11 Jan 2012 16:24:27 -0700

> I get the following compiler warnings from GNULIB:
> 
>   In file included from inet_ntop.c:41:0:
>   ./arpa/inet.h: In function 'inet_ntop':
>   inet_ntop.c:193:27: warning: 'best.len' may be used uninitialized in this 
> function [-Wuninitialized]
>   inet_ntop.c:158:5: note: 'best.len' was declared here
>   strptime.c: In function '__strptime_internal':
>   strptime.c:680:18: warning: variable 'neg' set but not used 
> [-Wunused-but-set-variable]
>   strptime.c:259:21: warning: variable 'era' set but not used 
> [-Wunused-but-set-variable]
>   strptime.c:245:15: warning: variable 'rp_backup' set but not used 
> [-Wunused-but-set-variable]
>   vasnprintf.c: In function 'vasnprintf':
>   vasnprintf.c:4612:21: warning: variable 'has_width' set but not used 
> [-Wunused-but-set-variable]

This silences the warnings in inet_ntop and strptime; I'll let
Bruno deal with the warning in vasnprintf (I don't want to
touch that twisty maze of ifdefs).  There, it might be easier
to just unconditionally declare:

int has_width _GL_UNUSED;

than to figure out the right set of #ifdef guards on when to
declare vs. when to use.

Eric Blake (2):
  inet_ntop: silence gcc warning
  strptime: silence gcc warnings

 ChangeLog       |   11 +++++++++++
 lib/inet_ntop.c |    1 +
 lib/strptime.c  |   13 ++++++++-----
 3 files changed, 20 insertions(+), 5 deletions(-)

-- 
1.7.7.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]