Deal with some compiler warnings.

This commit is contained in:
Jason S. Ninneman 2017-06-25 12:54:22 -07:00
parent 4821aeff60
commit 9301a4f419

View file

@ -234,9 +234,8 @@ static long GETNUM(FILE *source)
} }
/* Sections 1, 2, 5, 6, 10, 14. Skip these, they're all in YAML now. */ /* Sections 1, 2, 5, 6, 10, 14. Skip these, they're all in YAML now. */
static void read_messages(FILE* database, long sect) static void read_messages(FILE* database)
{ {
long KK = LINUSE;
while (true) { while (true) {
do { do {
if (NULL == fgets(INLINE + 1, sizeof(INLINE) - 1, database)) { if (NULL == fgets(INLINE + 1, sizeof(INLINE) - 1, database)) {
@ -337,8 +336,6 @@ static void read_sound_text(FILE* database)
{ {
long K; long K;
while ((K = GETNUM(database)) != -1) { while ((K = GETNUM(database)) != -1) {
long KK = GETNUM(NULL);
long I = GETNUM(NULL);
/* this stuff is in YAML now */ /* this stuff is in YAML now */
} }
} }
@ -371,10 +368,10 @@ static int read_database(FILE* database)
case 0: case 0:
return (0); return (0);
case 1: case 1:
read_messages(database, sect); read_messages(database);
break; break;
case 2: case 2:
read_messages(database, sect); read_messages(database);
break; break;
case 3: case 3:
read_section3_stuff(database); read_section3_stuff(database);
@ -383,10 +380,10 @@ static int read_database(FILE* database)
read_vocabulary(database); read_vocabulary(database);
break; break;
case 5: case 5:
read_messages(database, sect); read_messages(database);
break; break;
case 6: case 6:
read_messages(database, sect); read_messages(database);
break; break;
case 7: case 7:
read_initial_locations(database); read_initial_locations(database);
@ -398,7 +395,7 @@ static int read_database(FILE* database)
read_conditions(database); read_conditions(database);
break; break;
case 10: case 10:
read_messages(database, sect); read_messages(database);
break; break;
case 11: case 11:
read_hints(database); read_hints(database);
@ -409,7 +406,7 @@ static int read_database(FILE* database)
read_sound_text(database); read_sound_text(database);
break; break;
case 14: case 14:
read_messages(database, sect); read_messages(database);
break; break;
default: default:
BUG(INVALID_SECTION_NUMBER_IN_DATABASE); BUG(INVALID_SECTION_NUMBER_IN_DATABASE);