ruby-changes:17592
From: nobu <ko1@a...>
Date: Tue, 26 Oct 2010 18:09:44 +0900 (JST)
Subject: [ruby-changes:17592] Ruby:r29597 (trunk): * vsnprintf.c (BSD_vfprintf): suppress warnings.
nobu 2010-10-26 18:09:39 +0900 (Tue, 26 Oct 2010) New Revision: 29597 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29597 Log: * vsnprintf.c (BSD_vfprintf): suppress warnings. Modified files: trunk/vsnprintf.c Index: vsnprintf.c =================================================================== --- vsnprintf.c (revision 29596) +++ vsnprintf.c (revision 29597) @@ -127,6 +127,12 @@ # include <errno.h> #endif +#if __GNUC__ >= 3 +#define UNINITIALIZED_VAR(x) x = x +#else +#define UNINITIALIZED_VAR(x) x +#endif + /* * NB: to fit things in six character monocase externals, the stdio * code uses the prefix `__s' for stdio objects, typically followed @@ -543,9 +549,9 @@ int ndig = 0; /* actual number of digits returned by cvt */ char expstr[7]; /* buffer for exponent string */ #endif - u_long ulval; /* integer arguments %[diouxX] */ + u_long UNINITIALIZED_VAR(ulval); /* integer arguments %[diouxX] */ #ifdef _HAVE_SANE_QUAD_ - u_quad_t uqval; /* %q integers */ + u_quad_t UNINITIALIZED_VAR(uqval); /* %q integers */ #endif /* _HAVE_SANE_QUAD_ */ int base; /* base for [diouxX] conversion */ int dprec; /* a copy of prec if [diouxX], 0 otherwise */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/