# HG changeset patch # User John "Elwin" Edwards # Date 1619830110 14400 # Node ID 32bc72dcbf4ffbf3eba9adcd4c5977a209599a32 # Parent 057c5114e244ff2aca48bbf0d8b2a54b3877dfdb Fix some warnings related to format strings. diff -r 057c5114e244 -r 32bc72dcbf4f arogue5/command.c --- a/arogue5/command.c Sat Apr 17 15:41:12 2021 -0400 +++ b/arogue5/command.c Fri Apr 30 20:48:30 2021 -0400 @@ -854,7 +854,7 @@ md_shellescape(); - printf(retstr); + printf("%s", retstr); fflush(stdout); nonl(); noecho(); diff -r 057c5114e244 -r 32bc72dcbf4f arogue5/init.c --- a/arogue5/init.c Sat Apr 17 15:41:12 2021 -0400 +++ b/arogue5/init.c Fri Apr 30 20:48:30 2021 -0400 @@ -107,7 +107,7 @@ printf("\nBad percentages for %s:\n", name); for (end = &magic[bound] ; magic < end ; magic++) printf("%4d%% %s\n", magic->mi_prob, magic->mi_name); - printf(retstr); + printf("%s", retstr); fflush(stdout); while (getchar() != '\n') continue; diff -r 057c5114e244 -r 32bc72dcbf4f arogue5/rip.c --- a/arogue5/rip.c Sat Apr 17 15:41:12 2021 -0400 +++ b/arogue5/rip.c Fri Apr 30 20:48:30 2021 -0400 @@ -632,7 +632,7 @@ encread((char *) &scores[i].sc_system, SYSLEN, inf); encread((char *) &scores[i].sc_login, LINELEN, inf); encread((char *) scoreline, 100, inf); - sscanf(scoreline, " %lu %d %d %d %d %d \n", + sscanf(scoreline, " %lu %hd %hd %hd %hd %hd \n", &scores[i].sc_score, &scores[i].sc_flgs, &scores[i].sc_level, &scores[i].sc_ctype, &scores[i].sc_monster, &scores[i].sc_quest); diff -r 057c5114e244 -r 32bc72dcbf4f arogue7/command.c --- a/arogue7/command.c Sat Apr 17 15:41:12 2021 -0400 +++ b/arogue7/command.c Fri Apr 30 20:48:30 2021 -0400 @@ -1047,7 +1047,7 @@ md_shellescape(); - printf(retstr); + printf("%s", retstr); noecho(); raw(); keypad(cw,1); diff -r 057c5114e244 -r 32bc72dcbf4f arogue7/init.c --- a/arogue7/init.c Sat Apr 17 15:41:12 2021 -0400 +++ b/arogue7/init.c Fri Apr 30 20:48:30 2021 -0400 @@ -128,7 +128,7 @@ printf("\nBad percentages for %s:\n", name); for (end = &magic[bound] ; magic < end ; magic++) printf("%4d%% %s\n", magic->mi_prob, magic->mi_name); - printf(retstr); + printf("%s", retstr); fflush(stdout); while (getchar() != '\n') continue; diff -r 057c5114e244 -r 32bc72dcbf4f xrogue/command.c --- a/xrogue/command.c Sat Apr 17 15:41:12 2021 -0400 +++ b/xrogue/command.c Fri Apr 30 20:48:30 2021 -0400 @@ -1079,7 +1079,7 @@ md_shellescape(); - printf(retstr); + printf("%s", retstr); fflush(stdout); noecho(); crmode(); diff -r 057c5114e244 -r 32bc72dcbf4f xrogue/init.c --- a/xrogue/init.c Sat Apr 17 15:41:12 2021 -0400 +++ b/xrogue/init.c Fri Apr 30 20:48:30 2021 -0400 @@ -119,7 +119,7 @@ printf("\nBad percentages for %s:\n", name); for (end = &magic[bound] ; magic < end ; magic++) printf("%4d%% %s\n", magic->mi_prob, magic->mi_name); - printf(retstr); + printf("%s", retstr); fflush(stdout); while (getchar() != '\n') continue; diff -r 057c5114e244 -r 32bc72dcbf4f xrogue/state.c --- a/xrogue/state.c Sat Apr 17 15:41:12 2021 -0400 +++ b/xrogue/state.c Fri Apr 30 20:48:30 2021 -0400 @@ -3102,7 +3102,7 @@ fprintf(outf,"%st_flags : ", prefix); for(i = 0; i<16; i++) - fprintf(outf,"%X ",thing->t_flags[i]); + fprintf(outf,"%lX ",thing->t_flags[i]); fprintf(outf,"\n"); fprintf(outf,"%st_pack : %p\n",prefix,thing->t_pack);