Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sutcliffe <ir0nh34d@users.sourceforge.net>2009-07-13 03:02:10 +0400
committerChris Sutcliffe <ir0nh34d@users.sourceforge.net>2009-07-13 03:02:10 +0400
commit4f615d3ffe25c6460dc4004aa0bf6a8cdab939f9 (patch)
tree3c23a55da350bcee4e04067444bf1d98ecc75a84 /winsup/mingw
parent15e114f5c53b0f9f009384c16d7707f7195dbe27 (diff)
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')
-rw-r--r--winsup/mingw/ChangeLog4
-rw-r--r--winsup/mingw/mingwex/stdio/pformat.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index 2aaeba938..320383c29 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -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>
* mingwex/gdtoa/README.mingw mingwex/gdtoa/gdtoa_fltrnds.h: New files.
diff --git a/winsup/mingw/mingwex/stdio/pformat.c b/winsup/mingw/mingwex/stdio/pformat.c
index 2151a0945..c7bd61668 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