More compiler warning cleanup
Mostly removing some unused variables, but also "using" some of the new temp vars (e.g., "tmp = fgets(...); (void)tmp;")
This commit is contained in:
parent
717b13a866
commit
41e9fbd0c4
1 changed files with 16 additions and 11 deletions
|
|
@ -20577,8 +20577,9 @@ static void load_info_about_label_surface(FILE * lfi)
|
||||||
float new_to_old_ratio;
|
float new_to_old_ratio;
|
||||||
int old_pos;
|
int old_pos;
|
||||||
int new_pos;
|
int new_pos;
|
||||||
int x, y, pix_size;
|
int x, y;
|
||||||
int tmp_fscanf_return;
|
int tmp_fscanf_return;
|
||||||
|
char * tmp_fgets_return;
|
||||||
Uint8 a;
|
Uint8 a;
|
||||||
|
|
||||||
/* Clear label surface */
|
/* Clear label surface */
|
||||||
|
|
@ -20593,13 +20594,12 @@ static void load_info_about_label_surface(FILE * lfi)
|
||||||
have_to_rec_label_node = FALSE;
|
have_to_rec_label_node = FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// lfi = fopen(lfname, "r");
|
|
||||||
if (lfi == NULL)
|
if (lfi == NULL)
|
||||||
return;
|
return;
|
||||||
tmp_fscanf_return = fscanf(lfi, "%d\n", &list_ctr);
|
tmp_fscanf_return = fscanf(lfi, "%d\n", &list_ctr);
|
||||||
tmp_fscanf_return = fscanf(lfi, "%d\n", &tmp_scale_w);
|
tmp_fscanf_return = fscanf(lfi, "%d\n", &tmp_scale_w);
|
||||||
tmp_fscanf_return = fscanf(lfi, "%d\n\n", &tmp_scale_h);
|
tmp_fscanf_return = fscanf(lfi, "%d\n\n", &tmp_scale_h);
|
||||||
|
(void)tmp_fscanf_return;
|
||||||
|
|
||||||
old_width = tmp_scale_w;
|
old_width = tmp_scale_w;
|
||||||
old_height = tmp_scale_h;
|
old_height = tmp_scale_h;
|
||||||
|
|
@ -20678,7 +20678,8 @@ static void load_info_about_label_surface(FILE * lfi)
|
||||||
new_node->save_cur_font = 0;
|
new_node->save_cur_font = 0;
|
||||||
|
|
||||||
new_node->save_font_type = malloc(64);
|
new_node->save_font_type = malloc(64);
|
||||||
tmp_fscanf_return = fgets(new_node->save_font_type, 64, lfi);
|
tmp_fgets_return = fgets(new_node->save_font_type, 64, lfi);
|
||||||
|
(void)tmp_fgets_return;
|
||||||
|
|
||||||
tmp_fscanf_return = fscanf(lfi, "%d\n", &new_node->save_text_state);
|
tmp_fscanf_return = fscanf(lfi, "%d\n", &new_node->save_text_state);
|
||||||
tmp_fscanf_return = fscanf(lfi, "%u\n", &new_node->save_text_size);
|
tmp_fscanf_return = fscanf(lfi, "%u\n", &new_node->save_text_size);
|
||||||
|
|
@ -21253,7 +21254,7 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
||||||
blured when scaled one)*/
|
blured when scaled one)*/
|
||||||
for (u = 0; u < num_unknowns; u++)
|
for (u = 0; u < num_unknowns; u++)
|
||||||
{
|
{
|
||||||
printf("%s, %d\n", unknowns[u].name, unknowns[u].size);
|
printf("%s, %d\n", unknowns[u].name, (int) unknowns[u].size);
|
||||||
|
|
||||||
if (chunk_is_valid("tpDT", unknowns[u]))
|
if (chunk_is_valid("tpDT", unknowns[u]))
|
||||||
{
|
{
|
||||||
|
|
@ -21276,6 +21277,7 @@ void load_embedded_data(char *fname, SDL_Surface * org_surf)
|
||||||
CHAR_PTR_TMP = fgets(control, 49, fi);
|
CHAR_PTR_TMP = fgets(control, 49, fi);
|
||||||
CHAR_PTR_TMP = fgets(control, 49, fi);
|
CHAR_PTR_TMP = fgets(control, 49, fi);
|
||||||
CHAR_PTR_TMP = fgets(control, 49, fi);
|
CHAR_PTR_TMP = fgets(control, 49, fi);
|
||||||
|
(void)CHAR_PTR_TMP;
|
||||||
free(control);
|
free(control);
|
||||||
|
|
||||||
/* fi will be closed in load_starter_id() */
|
/* fi will be closed in load_starter_id() */
|
||||||
|
|
@ -22186,7 +22188,6 @@ application support folder */
|
||||||
}
|
}
|
||||||
if (tmpcfg.joystick_buttons_ignore)
|
if (tmpcfg.joystick_buttons_ignore)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
char *token;
|
char *token;
|
||||||
|
|
||||||
token = strtok(tmpcfg.joystick_buttons_ignore, ",");
|
token = strtok(tmpcfg.joystick_buttons_ignore, ",");
|
||||||
|
|
@ -22195,7 +22196,7 @@ application support folder */
|
||||||
if (strtof(token, NULL) < 0 || strtof(token, NULL) > 254)
|
if (strtof(token, NULL) < 0 || strtof(token, NULL) > 254)
|
||||||
{
|
{
|
||||||
/* FIXME: Find better exit code */
|
/* FIXME: Find better exit code */
|
||||||
printf("Joystick buttons must be between 0 and 254", tmpcfg.joystick_button_print);
|
printf("Joystick buttons must be between 0 and 254 (don't like %s)", tmpcfg.joystick_buttons_ignore);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
joystick_buttons_ignore[joystick_buttons_ignore_len++] = strtof(token, NULL);
|
joystick_buttons_ignore[joystick_buttons_ignore_len++] = strtof(token, NULL);
|
||||||
|
|
@ -23622,14 +23623,16 @@ static void claim_to_be_ready(void)
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i;
|
#ifdef DEBUG
|
||||||
CLOCK_TYPE time1;
|
CLOCK_TYPE time1;
|
||||||
CLOCK_TYPE time2;
|
CLOCK_TYPE time2;
|
||||||
CLOCK_TYPE time3;
|
#endif
|
||||||
|
|
||||||
(void)argc;
|
(void)argc;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
CLOCK_ASM(time1);
|
CLOCK_ASM(time1);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* do not add code (slowness) here unless required for scanning fonts */
|
/* do not add code (slowness) here unless required for scanning fonts */
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
|
|
@ -23650,7 +23653,10 @@ int main(int argc, char *argv[])
|
||||||
chdir_to_binary(argv[0]);
|
chdir_to_binary(argv[0]);
|
||||||
setup_config(argv);
|
setup_config(argv);
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
CLOCK_ASM(time2);
|
CLOCK_ASM(time2);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FORKED_FONTS
|
#ifdef FORKED_FONTS
|
||||||
/* must start ASAP, but depends on locale which in turn needs the config */
|
/* must start ASAP, but depends on locale which in turn needs the config */
|
||||||
#ifdef NO_SDLPANGO
|
#ifdef NO_SDLPANGO
|
||||||
|
|
@ -23686,8 +23692,6 @@ int main(int argc, char *argv[])
|
||||||
/* Set up! */
|
/* Set up! */
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
CLOCK_ASM(time3);
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("Seconds in early start-up: %.3f\n", (double)(time2 - time1) / CLOCK_SPEED);
|
printf("Seconds in early start-up: %.3f\n", (double)(time2 - time1) / CLOCK_SPEED);
|
||||||
printf("Seconds in late start-up: %.3f\n", (double)(time2 - time1) / CLOCK_SPEED);
|
printf("Seconds in late start-up: %.3f\n", (double)(time2 - time1) / CLOCK_SPEED);
|
||||||
|
|
@ -23861,6 +23865,7 @@ static int trash(char *path)
|
||||||
|
|
||||||
/* FIXME: Is this sufficient to find 'dbus-send' (rely on system to use $PATH?) -bjk 2011.04.18 */
|
/* FIXME: Is this sufficient to find 'dbus-send' (rely on system to use $PATH?) -bjk 2011.04.18 */
|
||||||
tmp = system("dbus-send / org.kde.KDirNotify.FilesAdded string:trash:/");
|
tmp = system("dbus-send / org.kde.KDirNotify.FilesAdded string:trash:/");
|
||||||
|
(void)tmp;
|
||||||
|
|
||||||
|
|
||||||
/* Note: GNOME figures out when things change because it asks the Kernel
|
/* Note: GNOME figures out when things change because it asks the Kernel
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue