Get rid of some warnings

* mingwex/dirent.c (_topendir): Eliminate signed/unsigned warning.
	* mingwex/strtoimax.c (strtoimax): Likewise.
	* mingwex/wcstoimax.c (wcstoimax): Likewise.
	* mingwex/wtoll.c (wtoll): Remove unnecessary ';'
	* mingwex/fesentenv.c: Include float.h.
	* mingwex/math/powl.c: Eliminate type punning/strict aliasing 
	warning.
	* mingwex/math/tanhl.c: Eliminate signed/unsigned warning in
	constants.
	* mingwex/math/tgammal.c: Likewise.
This commit is contained in:
Danny Smith 2003-03-17 01:03:43 +00:00
parent 9bd09d45f0
commit 48051a71ce
9 changed files with 34 additions and 11 deletions

View File

@ -1,3 +1,16 @@
2003-03-16 Danny Smith <dannysmith@users.sourceforge.net>
* mingwex/dirent.c (_topendir): Eliminate signed/unsigned warning.
* mingwex/strtoimax.c (strtoimax): Likewise.
* mingwex/wcstoimax.c (wcstoimax): Likewise.
* mingwex/wtoll.c (wtoll): Remove unnecessary ';'
* mingwex/fesentenv.c: Include float.h.
* mingwex/math/powl.c: Eliminate type punning/strict aliasing
warning.
* mingwex/math/tanhl.c: Eliminate signed/unsigned warning in
constants.
* mingwex/math/tgammal.c: Likewise.
2003-03-16 Danny Smith <dannysmith@users.sourceforge.net>
* include/utime.h: New file, forwarding to sys/utime.h.

View File

@ -58,7 +58,7 @@ _topendir (const _TCHAR *szPath)
/* Attempt to determine if the given path really is a directory. */
rc = GetFileAttributes (szPath);
if (rc == -1)
if (rc == (unsigned int)-1)
{
/* call GetLastError for more error info */
errno = ENOENT;

View File

@ -1,4 +1,5 @@
#include <fenv.h>
#include <float.h>
/* 7.6.4.3
The fesetenv function establishes the floating-point environment

View File

@ -269,8 +269,17 @@ static const unsigned short R[] = {
#else
#define MNEXP (-NXT*16384.0L)
#endif
static const unsigned short L[] = {0xc2ef,0x705f,0xeca5,0xe2a8,0x3ffd, XPD};
#define LOG2EA (*(long double *)(&L[0]))
static const
union
{
unsigned short L[6];
long double ld;
} log2ea = {{0xc2ef,0x705f,0xeca5,0xe2a8,0x3ffd, XPD}};
#define LOG2EA (log2ea.ld)
/*
#define LOG2EA 0.44269504088896340735992L
*/
#endif
#ifdef MIEEE

View File

@ -68,13 +68,13 @@ static long double Q[] = {
#endif
#ifdef IBMPC
static short P[] = {
static unsigned short P[] = {
0xd2a4,0x1b0c,0x8f15,0x8f99,0xbff1, XPD
0x5959,0x9111,0x9cc7,0xf4e2,0xbffe, XPD
0xb576,0xef5e,0x6d57,0xa81b,0xc005, XPD
0xe3be,0xbfbd,0x5cbc,0xa381,0xc009, XPD
};
static short Q[] = {
static unsigned short Q[] = {
/*0x0000,0x0000,0x0000,0x8000,0x3fff,*/
0x687f,0xce24,0xdd6c,0xc084,0x4005, XPD
0x3793,0xc95f,0xfa2f,0xe3b9,0x4009, XPD

View File

@ -88,7 +88,7 @@ static const long double Q[9] = {
};
#endif
#if IBMPC
static const short P[] = {
static const unsigned short P[] = {
0x434a,0x3f22,0x2bda,0xb0b2,0x3ff0, XPD
0xf5aa,0xe82f,0x335b,0xee2e,0x3ff3, XPD
0xbe6c,0x3757,0xc717,0x861b,0x3ff7, XPD
@ -98,7 +98,7 @@ static const short P[] = {
0x29cf,0x19b3,0x16c8,0xd67a,0x3ffe, XPD
0x0000,0x0000,0x0000,0x8000,0x3fff, XPD
};
static const short Q[] = {
static const unsigned short Q[] = {
0x5473,0x2de8,0x1268,0xea67,0xbfee, XPD
0x334b,0xc2f0,0xa2dd,0xf60e,0x3ff2, XPD
0xbeed,0x1853,0xa691,0xa23d,0xbff5, XPD
@ -182,7 +182,7 @@ static const long double STIR[9] = {
};
#endif
#if IBMPC
static const short STIR[] = {
static const unsigned short STIR[] = {
0x6ede,0x69f7,0x54e3,0xbb5d,0x3ff4, XPD
0xc395,0x0295,0x4443,0xc64b,0xbfef, XPD
0xba6f,0x7c59,0x5e47,0x9bfb,0xbff4, XPD

View File

@ -82,7 +82,7 @@ strtoimax(nptr, endptr, base)
accum = n;
for ( toobig = 0; n = ToNumber(*nptr), valid(n, base); ++nptr )
if ( accum > INTMAX_MAX / base + 2 ) /* major wrap-around */
if ( accum > (uintmax_t)(INTMAX_MAX / base + 2) ) /* major wrap-around */
toobig = 1; /* but keep scanning */
else
accum = base * accum + n;

View File

@ -89,7 +89,7 @@ wcstoimax(nptr, endptr, base)
accum = n;
for ( toobig = 0; n = ToWNumber(*nptr), valid(n, base); ++nptr )
if ( accum > INTMAX_MAX / base + 2 ) /* major wrap-around */
if ( accum > (uintmax_t)(INTMAX_MAX / base + 2) ) /* major wrap-around */
toobig = 1; /* but keep scanning */
else
accum = base * accum + n;

View File

@ -1,3 +1,3 @@
#include <stdlib.h>
long long wtoll(const wchar_t * _w)
{ return _wtoi64 (_w); };
{ return _wtoi64 (_w); }