From a7a6a9f932c1d8da883a7744fc85ba10d4ecd3d3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 21 Feb 2016 20:59:37 +0300 Subject: Fix compilation warnings. --- src/elogin/parse.c | 4 ++-- src/emap/npc.c | 2 +- src/emap/parse.c | 2 +- src/emap/script.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/elogin/parse.c b/src/elogin/parse.c index 66916f9..a59bdb6 100644 --- a/src/elogin/parse.c +++ b/src/elogin/parse.c @@ -55,7 +55,7 @@ int elogin_parse_client_login_pre(int *fdPtr, } char username[NAME_LENGTH]; safestrncpy(username, (const char*)RFIFOP(fd, 6), NAME_LENGTH); - int len = strnlen(username, NAME_LENGTH); + int len = safestrnlen(username, NAME_LENGTH); if (clientVersion < 2) { login->login_error(fd, 5); @@ -95,7 +95,7 @@ void elogin_parse_client_login2(int fd) safestrncpy(username, (const char*)RFIFOP(fd, 2), NAME_LENGTH); - int len = strnlen(username, NAME_LENGTH); + int len = safestrnlen(username, NAME_LENGTH); if (len < 2 || !(username[len - 2] == '_') || !memchr("FfMm", username[len - 1], 4)) { login->login_error(fd, 3); diff --git a/src/emap/npc.c b/src/emap/npc.c index 1772c0b..1fd3328 100644 --- a/src/emap/npc.c +++ b/src/emap/npc.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include "common/HPMi.h" #include "common/memmgr.h" diff --git a/src/emap/parse.c b/src/emap/parse.c index 8147dc8..226bf9c 100644 --- a/src/emap/parse.c +++ b/src/emap/parse.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include "common/HPMi.h" #include "common/memmgr.h" diff --git a/src/emap/script.c b/src/emap/script.c index a3ede58..373c5ae 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -1672,7 +1672,7 @@ BUILDIN(checkNpcCell) if (m == -1) { - ShowWarning("checknpccell: Attempted to run on unexsitent map '%s', type %d, x/y %d,%d\n", script_getstr(st, 2), type, x, y); + ShowWarning("checknpccell: Attempted to run on unexsitent map '%s', type %u, x/y %d,%d\n", script_getstr(st, 2), type, x, y); return true; } -- cgit v1.2.3-60-g2f50