diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-09 19:09:30 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-09 19:09:30 +0000 |
commit | 67e8d17feb8e5562b357909d70c627813e825b2b (patch) | |
tree | 202c4ef0b136ea33e29e09f410bb2c11b7ea8600 /src | |
parent | 82e095822ab5b3638dad0beef8d974d155fc7d2d (diff) | |
download | hercules-67e8d17feb8e5562b357909d70c627813e825b2b.tar.gz hercules-67e8d17feb8e5562b357909d70c627813e825b2b.tar.bz2 hercules-67e8d17feb8e5562b357909d70c627813e825b2b.tar.xz hercules-67e8d17feb8e5562b357909d70c627813e825b2b.zip |
- Fixed some compiling warnings.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10196 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/common/malloc.c | 8 | ||||
-rw-r--r-- | src/ladmin/ladmin.c | 4 | ||||
-rw-r--r-- | src/login/login.c | 6 | ||||
-rw-r--r-- | src/map/npc.c | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/common/malloc.c b/src/common/malloc.c index 1417bfbec..859b58b5e 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -575,8 +575,8 @@ static void memmgr_final (void) { #ifdef LOG_MEMMGR sprintf (buf, - "%04d : %s line %d size %d\n", ++count, - head->file, head->line, head->size); + "%04d : %s line %d size %lu\n", ++count, + head->file, head->line, (unsigned long)head->size); memmgr_log (buf); #endif // get block pointer and free it [celest] @@ -623,8 +623,8 @@ static void memmgr_final (void) large2 = large->next; #ifdef LOG_MEMMGR sprintf (buf, - "%04d : %s line %d size %d\n", ++count, - large->unit_head.file, large->unit_head.line, large->unit_head.size); + "%04d : %s line %d size %lu\n", ++count, + large->unit_head.file, large->unit_head.line, (unsigned long)large->unit_head.size); memmgr_log (buf); #endif FREE(large,file,line,func); diff --git a/src/ladmin/ladmin.c b/src/ladmin/ladmin.c index 38d7dcefc..66bada1c3 100644 --- a/src/ladmin/ladmin.c +++ b/src/ladmin/ladmin.c @@ -2198,11 +2198,11 @@ int changememo(char* param) { if (strlen(memo) > 254) { if (defaultlanguage == 'F') { - printf("Mémo trop long (%d caractères).\n", strlen(memo)); + printf("Mémo trop long (%lu caractères).\n", (unsigned long)strlen(memo)); printf("Entrez un mémo de 254 caractères maximum svp.\n"); ladmin_log("Mémo trop long (%d caractères). Entrez un mémo de 254 caractères maximum svp." RETCODE, strlen(memo)); } else { - printf("Memo is too long (%d characters).\n", strlen(memo)); + printf("Memo is too long (%lu characters).\n", (unsigned long)strlen(memo)); printf("Please input a memo of 254 bytes at the maximum.\n"); ladmin_log("Email is too long (%d characters). Please input a memo of 254 bytes at the maximum." RETCODE, strlen(memo)); } diff --git a/src/login/login.c b/src/login/login.c index bb4866970..65e3d666e 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1940,7 +1940,7 @@ int parse_fromchar(int fd) time(&raw_time); strftime(tmpstr, 23, date_format, localtime(&raw_time)); fprintf(logfp, "%s: receiving of an unknown packet -> disconnection" RETCODE, tmpstr); - fprintf(logfp, "parse_fromchar: connection #%d (ip: %s), packet: 0x%x (with being read: %d)." RETCODE, fd, ip, RFIFOW(fd,0), RFIFOREST(fd)); + fprintf(logfp, "parse_fromchar: connection #%d (ip: %s), packet: 0x%x (with being read: %lu)." RETCODE, fd, ip, RFIFOW(fd,0), (unsigned long)RFIFOREST(fd)); fprintf(logfp, "Detail (in hex):" RETCODE); fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F" RETCODE); memset(tmpstr, '\0', sizeof(tmpstr)); @@ -2906,7 +2906,7 @@ int parse_admin(int fd) time(&raw_time); strftime(tmpstr, 23, date_format, localtime(&raw_time)); fprintf(logfp, "%s: receiving of an unknown packet -> disconnection" RETCODE, tmpstr); - fprintf(logfp, "parse_admin: connection #%d (ip: %s), packet: 0x%x (with being read: %d)." RETCODE, fd, ip, RFIFOW(fd,0), RFIFOREST(fd)); + fprintf(logfp, "parse_admin: connection #%d (ip: %s), packet: 0x%x (with being read: %lu)." RETCODE, fd, ip, RFIFOW(fd,0), (unsigned long)RFIFOREST(fd)); fprintf(logfp, "Detail (in hex):" RETCODE); fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F" RETCODE); memset(tmpstr, '\0', sizeof(tmpstr)); @@ -3333,7 +3333,7 @@ int parse_login(int fd) time(&raw_time); strftime(tmpstr, 23, date_format, localtime(&raw_time)); fprintf(logfp, "%s: receiving of an unknown packet -> disconnection" RETCODE, tmpstr); - fprintf(logfp, "parse_login: connection #%d (ip: %s), packet: 0x%x (with being read: %d)." RETCODE, fd, ip, RFIFOW(fd,0), RFIFOREST(fd)); + fprintf(logfp, "parse_login: connection #%d (ip: %s), packet: 0x%x (with being read: %lu)." RETCODE, fd, ip, RFIFOW(fd,0), (unsigned long)RFIFOREST(fd)); fprintf(logfp, "Detail (in hex):" RETCODE); fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F" RETCODE); memset(tmpstr, '\0', sizeof(tmpstr)); diff --git a/src/map/npc.c b/src/map/npc.c index 01ade4d02..20b7206d4 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1206,8 +1206,8 @@ int npc_scriptcont(struct map_session_data *sd,int id) TBL_NPC* nd_sd=(TBL_NPC*)map_id2bl(sd->npc_id); TBL_NPC* nd=(TBL_NPC*)map_id2bl(id); ShowDebug("npc_scriptcont: %s (sd->npc_id=%d) is not %s (id=%d).\n", - nd_sd?nd_sd->name:"'Unknown NPC'", sd->npc_id, - nd?nd->name:"'Unknown NPC'", id); + nd_sd?(char*)nd_sd->name:"'Unknown NPC'", (int)sd->npc_id, + nd?(char*)nd->name:"'Unknown NPC'", (int)id); return 1; } |