Fixed a few compiler warnings on clang (#3263)

Mostly pointer-bool-conversion and autological-pointer-compare
This commit is contained in:
Lemongrass3110
2018-07-05 22:53:20 +02:00
committed by GitHub
parent 532e043490
commit 91169d7ebc
16 changed files with 55 additions and 79 deletions

View File

@@ -3728,7 +3728,7 @@ static int char_ip_set = 0;
int parse_console(const char* buf){
char type[64];
char command[64];
char mapname[64];
char mapname[MAP_NAME_LENGTH];
int16 x = 0;
int16 y = 0;
int n;
@@ -3737,7 +3737,7 @@ int parse_console(const char* buf){
memset(&sd, 0, sizeof(struct map_session_data));
strcpy(sd.status.name, "console");
if( ( n = sscanf(buf, "%63[^:]:%63[^:]:%63s %6hd %6hd[^\n]", type, command, mapname, &x, &y) ) < 5 ){
if( ( n = sscanf(buf, "%63[^:]:%63[^:]:%11s %6hd %6hd[^\n]", type, command, mapname, &x, &y) ) < 5 ){
if( ( n = sscanf(buf, "%63[^:]:%63[^\n]", type, command) ) < 2 ) {
if((n = sscanf(buf, "%63[^\n]", type))<1) return -1; //nothing to do no arg
}