Fixed some compiler warnings that Visual Studio reported.

This commit is contained in:
Ryan C. Gordon 2013-07-20 19:51:51 -04:00
parent 8328f33947
commit 30b6bedb57
5 changed files with 6 additions and 6 deletions

View file

@ -49,7 +49,7 @@ typedef struct SDL_Thread SDL_Thread;
typedef unsigned long SDL_threadID;
/* Thread local storage ID, 0 is the invalid ID */
typedef unsigned SDL_TLSID;
typedef unsigned int SDL_TLSID;
/* The SDL thread priority
*

View file

@ -1350,7 +1350,7 @@ SDL_PrintUnsignedLongLong(char *text, size_t maxlen, SDL_FormatInfo *info, Uint6
static size_t
SDL_PrintFloat(char *text, size_t maxlen, SDL_FormatInfo *info, double arg)
{
int i, width;
int width;
size_t len;
size_t left = maxlen;
char *textstart = text;

View file

@ -57,8 +57,8 @@ SDL_TLSSet(SDL_TLSID id, const void *value, void (*destructor)(void *))
}
storage = SDL_SYS_GetTLSData();
if (!storage || id > storage->limit) {
int i, oldlimit, newlimit;
if (!storage || (id > storage->limit)) {
unsigned int i, oldlimit, newlimit;
oldlimit = storage ? storage->limit : 0;
newlimit = (id + TLS_ALLOC_CHUNKSIZE);

View file

@ -58,7 +58,7 @@ extern void SDL_RunThread(void *data);
/* This is the system-independent thread local storage structure */
typedef struct {
int limit;
unsigned int limit;
struct {
void *data;
void (*destructor)(void*);

View file

@ -178,7 +178,7 @@ SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)
return SDL_InvalidParamError("surface");
}
if (surface->format->palette && key >= surface->format->palette->ncolors) {
if (surface->format->palette && key >= ((Uint32) surface->format->palette->ncolors)) {
return SDL_InvalidParamError("key");
}