Mercurial > hg > early-roguelike
changeset 307:32bc72dcbf4f
Fix some warnings related to format strings.
author | John "Elwin" Edwards |
---|---|
date | Fri, 30 Apr 2021 20:48:30 -0400 |
parents | 057c5114e244 |
children | 13b482bd9e66 |
files | arogue5/command.c arogue5/init.c arogue5/rip.c arogue7/command.c arogue7/init.c xrogue/command.c xrogue/init.c xrogue/state.c |
diffstat | 8 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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();
--- 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;
--- 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);
--- 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);
--- 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;
--- 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();
--- 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;
--- 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);