From f9825294f7b2822c09037aacebe35e29f673f292 Mon Sep 17 00:00:00 2001 From: "fabio.olimpieri" Date: Fri, 16 May 2014 22:43:19 +0000 Subject: [PATCH] Removed some warnings (option -W) --- src/emulator.c | 3 ++- src/emulator.h | 3 ++- src/gui_sdl.c | 2 +- src/menu_sdl.c | 2 +- src/sound.c | 2 +- src/tape_browser.c | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/emulator.c b/src/emulator.c index ae2be2a..ee26839 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -87,7 +87,8 @@ char rom_cartridge[MAX_PATH_LENGTH]; char pasted_file[MAX_PATH_LENGTH]; unsigned int colors[80]; -unsigned int jump_frames,curr_frames, turbo_n; +unsigned int curr_frames, turbo_n; +int jump_frames; static SDL_Surface *image; diff --git a/src/emulator.h b/src/emulator.h index 1beb66a..11579b3 100644 --- a/src/emulator.h +++ b/src/emulator.h @@ -51,7 +51,8 @@ extern char rom_cartridge[MAX_PATH_LENGTH]; extern char pasted_file[MAX_PATH_LENGTH]; extern unsigned int colors[80]; -extern unsigned int jump_frames,curr_frames, turbo_n; +extern unsigned int curr_frames, turbo_n; +extern int jump_frames; extern unsigned char sdismount, usbismount, smbismount, tmpismade, ftpismount,networkisinit; void SDL_Fullscreen_Switch(void); diff --git a/src/gui_sdl.c b/src/gui_sdl.c index d7a5664..c058914 100644 --- a/src/gui_sdl.c +++ b/src/gui_sdl.c @@ -272,7 +272,7 @@ static void tape_browser() block_n_int=atoi(block_n); - if ((block_n_int<0)||(block_n_int >(MAX_BROWSER_ITEM-1))) return; + if (block_n_int >(MAX_BROWSER_ITEM-1)) return; tape_position=browser_list[block_n_int]->position; diff --git a/src/menu_sdl.c b/src/menu_sdl.c index edc399a..4d774a9 100644 --- a/src/menu_sdl.c +++ b/src/menu_sdl.c @@ -1618,7 +1618,7 @@ int menu_is_inited(void) } //Sound must be reseted before calling this function (except for ASND) -void play_click(sound) +void play_click(int sound) { if (!ordenador.gui_sound) return; #ifdef GEKKO diff --git a/src/sound.c b/src/sound.c index fc83e6b..6ba9676 100644 --- a/src/sound.c +++ b/src/sound.c @@ -261,7 +261,7 @@ int sound_init_sdl() { #ifdef GEKKO int voice; -void callback(voice) +void callback(int voice) {} int sound_init_asnd() { diff --git a/src/tape_browser.c b/src/tape_browser.c index dc5cb1d..e60ed17 100644 --- a/src/tape_browser.c +++ b/src/tape_browser.c @@ -482,7 +482,7 @@ int select_block(FILE * fichero) block_n_int=atoi(block_n); - if ((block_n_int<0)||(block_n_int >(MAX_SELECT_ITEM-1))||block_select_list[block_n_int]==NULL) return -1; + if ((block_n_int >(MAX_SELECT_ITEM-1))||block_select_list[block_n_int]==NULL) return -1; if ((block_select_list[block_n_int]->offset+blk_sel_pos) > (MAX_BROWSER_ITEM-1)) return -1;