2009-07-12 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>

* mingwex/stdio/pformat.c: Fix compiler warnings with GCC 4.4.0.
This commit is contained in:
Chris Sutcliffe 2009-07-12 23:02:10 +00:00
parent 15e114f5c5
commit 4f615d3ffe
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2009-07-12 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* mingwex/stdio/pformat.c: Fix compiler warnings with GCC 4.4.0.
2009-06-28 Ozkan Sezer <sezero@users.sourceforge.net> 2009-06-28 Ozkan Sezer <sezero@users.sourceforge.net>
* mingwex/gdtoa/README.mingw mingwex/gdtoa/gdtoa_fltrnds.h: New files. * mingwex/gdtoa/README.mingw mingwex/gdtoa/gdtoa_fltrnds.h: New files.

View File

@ -734,7 +734,8 @@ char *__pformat_cvt( int mode, __pformat_fpreg_t x, int nd, int *dp, int *sign )
* his `__gdtoa()' function in a manner to provide extended precision * his `__gdtoa()' function in a manner to provide extended precision
* replacements for `ecvt()' and `fcvt()'. * replacements for `ecvt()' and `fcvt()'.
*/ */
unsigned int k, e = 0; char *ep; int k;
unsigned int e = 0; char *ep;
static FPI fpi = { 64, 1-16383-64+1, 32766-16383-64+1, FPI_Round_near, 0 }; static FPI fpi = { 64, 1-16383-64+1, 32766-16383-64+1, FPI_Round_near, 0 };
/* Classify the argument into an appropriate `__gdtoa()' category... /* Classify the argument into an appropriate `__gdtoa()' category...
@ -1816,7 +1817,7 @@ int __pformat( int flags, void *dest, int max, const char *fmt, va_list argv )
/* Save the current format scan position, so that we can backtrack /* Save the current format scan position, so that we can backtrack
* in the event of encountering an invalid format specification... * in the event of encountering an invalid format specification...
*/ */
char *backtrack = fmt; const char *backtrack = fmt;
/* Restart capture for dynamic field width and precision specs... /* Restart capture for dynamic field width and precision specs...
*/ */
@ -1882,7 +1883,8 @@ int __pformat( int flags, void *dest, int max, const char *fmt, va_list argv )
* `wchar_t' data, (which is promoted to an `int' argument)... * `wchar_t' data, (which is promoted to an `int' argument)...
*/ */
argval.__pformat_ullong_t = (wchar_t)(va_arg( argv, int )); argval.__pformat_ullong_t = (wchar_t)(va_arg( argv, int ));
__pformat_wputchars( (wchar_t *)(&argval), 1, &stream ); void *tmp = &argval;
__pformat_wputchars( (wchar_t *)tmp, 1, &stream );
} }
else else