Resolves compile warnings (#4652)

* Fixes #4649.
* Resolves some compile warnings for the mapcache and csv2yaml tools.
Thanks to @reigneil!
This commit is contained in:
Aleos 2020-02-18 08:40:55 -05:00 committed by GitHub
parent 3800299213
commit 04a83ec774
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -85,7 +85,7 @@ std::unordered_map<uint16, s_skill_db> skill_nearnpc;
// Forward declaration of conversion functions // Forward declaration of conversion functions
static bool guild_read_guildskill_tree_db( char* split[], int columns, int current ); static bool guild_read_guildskill_tree_db( char* split[], int columns, int current );
static size_t pet_read_db( const char* file ); static bool pet_read_db( const char* file );
static bool skill_parse_row_magicmushroomdb(char* split[], int column, int current); static bool skill_parse_row_magicmushroomdb(char* split[], int column, int current);
static bool skill_parse_row_abradb(char* split[], int columns, int current); static bool skill_parse_row_abradb(char* split[], int columns, int current);
static bool skill_parse_row_improvisedb(char* split[], int columns, int current); static bool skill_parse_row_improvisedb(char* split[], int columns, int current);
@ -677,12 +677,12 @@ static bool guild_read_guildskill_tree_db( char* split[], int columns, int curre
} }
// Copied and adjusted from pet.cpp // Copied and adjusted from pet.cpp
static size_t pet_read_db( const char* file ){ static bool pet_read_db( const char* file ){
FILE* fp = fopen( file, "r" ); FILE* fp = fopen( file, "r" );
if( fp == nullptr ){ if( fp == nullptr ){
ShowError( "can't read %s\n", file ); ShowError( "can't read %s\n", file );
return 0; return false;
} }
int lines = 0; int lines = 0;
@ -851,7 +851,7 @@ static size_t pet_read_db( const char* file ){
fclose(fp); fclose(fp);
ShowStatus("Done reading '" CL_WHITE "%d" CL_RESET "' pets in '" CL_WHITE "%s" CL_RESET "'.\n", entries, file ); ShowStatus("Done reading '" CL_WHITE "%d" CL_RESET "' pets in '" CL_WHITE "%s" CL_RESET "'.\n", entries, file );
return entries; return true;
} }
// Copied and adjusted from skill.cpp // Copied and adjusted from skill.cpp

View File

@ -52,7 +52,7 @@ struct map_info {
int read_map(char *name, struct map_data *m) int read_map(char *name, struct map_data *m)
{ {
char filename[256]; char filename[256];
unsigned char *gat, *rsw; unsigned char *gat;
int water_height; int water_height;
size_t xy, off, num_cells; size_t xy, off, num_cells;