2009-04-16 Ozkan Sezer <sezeroz@gmail.com>

* gdtoa/gethex.c: Avoid compiler warnings about pointer targets differing
	in signedness.


git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@796 4407c894-4637-0410-b4f5-ada5f102cad1
This commit is contained in:
Ozkan Sezer 2009-04-16 14:00:17 +00:00
parent 17007aa7ee
commit 6f6dd7bed4
2 changed files with 11 additions and 6 deletions

View File

@ -21,6 +21,9 @@
* gdtoa/g_xfmt.c: Added maintream code for general purposes and kept
our fpclassiy() code for mingw builds.
* gdtoa/gethex.c: Avoid compiler warnings about pointer targets differing
in signedness.
2009-04-15 Kai Tietz <kai.tietz@onevision.com>
* math/copysign.c: Avoid breaking of strict aliasing.

View File

@ -44,15 +44,17 @@ int gethex (const char **sp, FPI *fpi, Long *exp, Bigint **bp, int sign)
Long e, e1;
#ifdef USE_LOCALE
int i;
#ifdef NO_LOCALE_CACHE
const unsigned char *decimalpoint = (unsigned char*)localeconv()->decimal_point;
#else
const unsigned char *decimalpoint;
#ifdef NO_LOCALE_CACHE
decimalpoint = (unsigned char *)localeconv()->decimal_point;
#else
static unsigned char *decimalpoint_cache;
if (!(s0 = decimalpoint_cache)) {
s0 = (unsigned char*)localeconv()->decimal_point;
if ((decimalpoint_cache = (char*)MALLOC(strlen(s0) + 1))) {
strcpy(decimalpoint_cache, s0);
s0 = (unsigned char *)localeconv()->decimal_point;
decimalpoint_cache = (unsigned char *)
MALLOC(strlen((char *)s0) + 1);
if (decimalpoint_cache) {
strcpy((char *)decimalpoint_cache, (char *)s0);
s0 = decimalpoint_cache;
}
}