Fixed a bunch of compiler warnings.
--HG-- extra : rebase_source : a2c94cfaf300f4d9f5b7855489ed05c8e23de9fd
This commit is contained in:
parent
03c8f2002b
commit
fca3874ab4
8 changed files with 43 additions and 42 deletions
|
@ -686,7 +686,7 @@ SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize, int freesrc)
|
|||
|
||||
size_total = 0;
|
||||
for (;;) {
|
||||
if ((size_total + FILE_CHUNK_SIZE) > size) {
|
||||
if ((((Sint64)size_total) + FILE_CHUNK_SIZE) > size) {
|
||||
size = (size_total + FILE_CHUNK_SIZE);
|
||||
newdata = SDL_realloc(data, (size_t)(size + 1));
|
||||
if (!newdata) {
|
||||
|
|
|
@ -362,7 +362,7 @@ typedef struct { char * first; char * last; } stack_entry;
|
|||
|
||||
static char * pivot_big(char *first, char *mid, char *last, size_t size,
|
||||
int compare(const void *, const void *)) {
|
||||
int d=(((last-first)/size)>>3)*size;
|
||||
size_t d=(((last-first)/size)>>3)*size;
|
||||
#ifdef DEBUG_QSORT
|
||||
fprintf(stderr, "pivot_big: first=%p last=%p size=%lu n=%lu\n", first, (unsigned long)last, size, (unsigned long)((last-first+1)/size));
|
||||
#endif
|
||||
|
|
|
@ -103,11 +103,11 @@ SDLTest_GenerateExecKey(const char *runSeed, char *suiteName, char *testName, in
|
|||
SDLTest_Md5Context md5Context;
|
||||
Uint64 *keys;
|
||||
char iterationString[16];
|
||||
Uint32 runSeedLength;
|
||||
Uint32 suiteNameLength;
|
||||
Uint32 testNameLength;
|
||||
Uint32 iterationStringLength;
|
||||
Uint32 entireStringLength;
|
||||
size_t runSeedLength;
|
||||
size_t suiteNameLength;
|
||||
size_t testNameLength;
|
||||
size_t iterationStringLength;
|
||||
size_t entireStringLength;
|
||||
char *buffer;
|
||||
|
||||
if (runSeed == NULL || runSeed[0] == '\0') {
|
||||
|
@ -150,7 +150,7 @@ SDLTest_GenerateExecKey(const char *runSeed, char *suiteName, char *testName, in
|
|||
|
||||
/* Hash string and use half of the digest as 64bit exec key */
|
||||
SDLTest_Md5Init(&md5Context);
|
||||
SDLTest_Md5Update(&md5Context, (unsigned char *)buffer, entireStringLength);
|
||||
SDLTest_Md5Update(&md5Context, (unsigned char *)buffer, (unsigned int) entireStringLength);
|
||||
SDLTest_Md5Final(&md5Context);
|
||||
SDL_free(buffer);
|
||||
keys = (Uint64 *)md5Context.digest;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue