Skip to content

Commit

Permalink
Fix several warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerome Portal committed Apr 16, 2013
1 parent 220fe29 commit d817e08
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
7 changes: 7 additions & 0 deletions src/SDL_extras.c
Expand Up @@ -1388,6 +1388,13 @@ SDL_Surface* BlackOutline_w(const wchar_t* t, int font_size, const SDL_Color* c,
}

i = ConvertToUTF8(wchar_tmp, tmp, 1024);

if (i == 0)
{
fprintf(stderr, "BlackOutline_w(): unable to convert to UTF8, returning.\n");
return NULL;
}

//tmp[i] = 0;

DEBUGCODE
Expand Down
4 changes: 1 addition & 3 deletions src/editor.c
Expand Up @@ -508,7 +508,6 @@ void EditWordList(char* words_file)
SDL_Rect word_rects[8];
int stop = 0;
int loc = 0;
int old_loc = 1;

FILE* fp = NULL;

Expand Down Expand Up @@ -893,7 +892,6 @@ void EditWordList(char* words_file)
SDL_UpdateRect(screen, 0, 0, 0 ,0);
}
SDL_Delay(40); // I assume throttling so we don't eat all CPU
old_loc = loc;
} // End of 'while (SDL_PollEvent(&event))' loop
} // End of 'while(!stop)' loop

Expand Down Expand Up @@ -956,7 +954,7 @@ void EditWordList(char* words_file)
SDL_FreeSurface(right);
/* the pointers are going out of scope so we don't */
/* have to worry about setting them to NULL */
}
}


/* "Private" functions */
Expand Down
1 change: 0 additions & 1 deletion src/input_methods.c
Expand Up @@ -416,7 +416,6 @@ static IM_EVENT_FN im_event_fns[NUM_LANGS] = {NULL};
* UTILITY FUNCTIONS
*/

#define MIN(a,b) ((a)<=(b) ? (a) : (b))
#define IN_RANGE(a,v,b) ( (a)<=(v) && (v)<(b) )
#define ARRAYLEN(a) ( sizeof(a)/sizeof(*(a)) )

Expand Down
3 changes: 1 addition & 2 deletions src/laser.c
Expand Up @@ -81,7 +81,7 @@ int PlayLaserGame(int diff_level)
int i, img, done, quit, frame, lowest, lowest_y,
tux_img, old_tux_img, tux_pressing, tux_anim, tux_anim_frame,
tux_same_counter, level_start_wait, num_cities_alive,
num_comets_alive, paused, picked_comet,
num_comets_alive, paused,
gameover;

Uint16 key_unicode;
Expand Down Expand Up @@ -147,7 +147,6 @@ int PlayLaserGame(int diff_level)

frame = 0;
paused = 0;
picked_comet = -1;
tux_img = IMG_TUX_RELAX1;
tux_anim = -1;
tux_anim_frame = 0;
Expand Down
7 changes: 0 additions & 7 deletions src/loaders.c
Expand Up @@ -36,7 +36,6 @@ static SDL_Surface* win_bkgd = NULL;
static SDL_Surface* fullscr_bkgd = NULL;

/* Local function prototypes: */
static int max(int n1, int n2);
//static SDL_Surface* flip(SDL_Surface *in, int x, int y);

/* Returns 1 if valid file, 2 if valid dir, 0 if neither: */
Expand Down Expand Up @@ -119,12 +118,6 @@ void LoadLang(void)
}


int max(int n1, int n2)
{
return (n1 > n2 ? n1 : n2);
}


#ifdef HAVE_RSVG
/***********************
SVG related functions
Expand Down
2 changes: 0 additions & 2 deletions src/playgame.c
Expand Up @@ -751,7 +751,6 @@ LoadTuxAnims : Load the Tux graphics and animations
static int LoadTuxAnims(void)
{
int i;
int height = 0; //temp width/height varis to determine max's

LOG("LoadTuxAnims(): Loading Tux Animations\n");

Expand All @@ -768,7 +767,6 @@ static int LoadTuxAnims(void)
}

tux_max_width = tux_object.spr[TUX_STANDING][RIGHT]->frame[0]->w;
height = tux_object.spr[TUX_STANDING][RIGHT]->frame[0]->h;

LOG("LoadTuxAnims(): END\n");

Expand Down

0 comments on commit d817e08

Please sign in to comment.