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

Commit

Permalink
Visual C++ compiler warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 12, 2007
1 parent 27919ac commit 6599422
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
Binary file modified VisualC.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion src/file/SDL_rwops.c
Expand Up @@ -191,7 +191,7 @@ win32_file_read(SDL_RWops * context, void *ptr, size_t size, size_t maxnum)
void *data = (char *) context->hidden.win32io.buffer.data +
context->hidden.win32io.buffer.size -
context->hidden.win32io.buffer.left;
read_ahead = SDL_min(total_need, context->hidden.win32io.buffer.left);
read_ahead = SDL_min(total_need, (size_t)context->hidden.win32io.buffer.left);
SDL_memcpy(ptr, data, read_ahead);
context->hidden.win32io.buffer.left -= read_ahead;

Expand Down
6 changes: 3 additions & 3 deletions test/common.c
Expand Up @@ -245,15 +245,15 @@ CommonArg(CommonState * state, int index)
if (!argv[index]) {
return -1;
}
state->audiospec.channels = SDL_atoi(argv[index]);
state->audiospec.channels = (Uint8)SDL_atoi(argv[index]);
return 2;
}
if (SDL_strcasecmp(argv[index], "--samples") == 0) {
++index;
if (!argv[index]) {
return -1;
}
state->audiospec.samples = SDL_atoi(argv[index]);
state->audiospec.samples = (Uint16)SDL_atoi(argv[index]);
return 2;
}
if ((SDL_strcasecmp(argv[index], "-h") == 0)
Expand Down Expand Up @@ -498,7 +498,7 @@ PrintRenderer(SDL_RendererInfo * info)
fprintf(stderr, ")\n");

fprintf(stderr, " Texture formats (%d): ", info->num_texture_formats);
for (i = 0; i < info->num_texture_formats; ++i) {
for (i = 0; i < (int)info->num_texture_formats; ++i) {
if (i > 0) {
fprintf(stderr, ", ");
}
Expand Down
2 changes: 0 additions & 2 deletions test/loopwave.c
Expand Up @@ -67,8 +67,6 @@ poked(int sig)
int
main(int argc, char *argv[])
{
int i, n;

/* Load the SDL library */
if (SDL_Init(SDL_INIT_AUDIO) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
Expand Down
2 changes: 1 addition & 1 deletion test/testwm.c
Expand Up @@ -175,7 +175,7 @@ HotKey_Quit(void)
SDL_PushEvent(&event);
}

static int SDLCALL(*old_filterfunc) (void *, SDL_Event *);
static int (SDLCALL *old_filterfunc) (void *, SDL_Event *);
static void *old_filterdata;

int SDLCALL
Expand Down

0 comments on commit 6599422

Please sign in to comment.