Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Fixed some compiler warnings that Visual Studio reported.
  • Loading branch information
icculus committed Jul 20, 2013
1 parent 1daa7fb commit f70a37d4d903c38c4de3174eb3c95d300b4cb9c0
Showing with 6 additions and 6 deletions.
  1. +1 −1 include/SDL_thread.h
  2. +1 −1 src/stdlib/SDL_string.c
  3. +2 −2 src/thread/SDL_thread.c
  4. +1 −1 src/thread/SDL_thread_c.h
  5. +1 −1 src/video/SDL_surface.c
@@ -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
*
@@ -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;
@@ -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);
@@ -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*);
@@ -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");
}

0 comments on commit f70a37d

Please sign in to comment.