mirror of
https://github.com/yawut/SDL.git
synced 2026-08-22 00:35:18 -05:00
Visual C++ compiler warning fixes
This commit is contained in:
@@ -245,7 +245,7 @@ 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) {
|
||||
@@ -253,7 +253,7 @@ CommonArg(CommonState * state, int 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)
|
||||
@@ -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, ", ");
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user