Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed some compiler warnings that Visual Studio reported.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 20, 2013
1 parent 1daa7fb commit f70a37d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/SDL_thread.h
Expand Up @@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib/SDL_string.c
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/thread/SDL_thread.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/thread/SDL_thread_c.h
Expand Up @@ -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*);
Expand Down
2 changes: 1 addition & 1 deletion src/video/SDL_surface.c
Expand Up @@ -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");
}

Expand Down

0 comments on commit f70a37d

Please sign in to comment.