aboutsummaryrefslogtreecommitdiff
path: root/winsup/mingw/mingwex
diff options
context:
space:
mode:
authorChris Sutcliffe <ir0nh34d@users.sourceforge.net>2009-07-12 23:02:10 +0000
committerChris Sutcliffe <ir0nh34d@users.sourceforge.net>2009-07-12 23:02:10 +0000
commit4f615d3ffe25c6460dc4004aa0bf6a8cdab939f9 (patch)
tree3c23a55da350bcee4e04067444bf1d98ecc75a84 /winsup/mingw/mingwex
parent15e114f5c53b0f9f009384c16d7707f7195dbe27 (diff)
downloadnewlib-4f615d3ffe25c6460dc4004aa0bf6a8cdab939f9.zip
newlib-4f615d3ffe25c6460dc4004aa0bf6a8cdab939f9.tar.gz
newlib-4f615d3ffe25c6460dc4004aa0bf6a8cdab939f9.tar.bz2
2009-07-12 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* mingwex/stdio/pformat.c: Fix compiler warnings with GCC 4.4.0.
Diffstat (limited to 'winsup/mingw/mingwex')
-rw-r--r--winsup/mingw/mingwex/stdio/pformat.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/mingw/mingwex/stdio/pformat.c b/winsup/mingw/mingwex/stdio/pformat.c
index 2151a09..c7bd616 100644
--- a/winsup/mingw/mingwex/stdio/pformat.c
+++ b/winsup/mingw/mingwex/stdio/pformat.c
@@ -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
* 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 };
/* 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
* 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...
*/
@@ -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)...
*/
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