From 4dfeeade06a192f9c68a1a195f1db36c747be302 Mon Sep 17 00:00:00 2001 From: aleos Date: Sat, 8 Jul 2017 11:42:53 -0400 Subject: [PATCH] Resolve some compile warnings * Fixes #2245. Thanks to @lelouch22! --- src/map/clif.c | 4 ++-- src/map/mail.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index dddc4a4b6c..a773ebd0f9 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -15231,9 +15231,9 @@ void clif_Mail_read(struct map_session_data *sd, int mail_id) struct mail_message *msg = &sd->mail.inbox.msg[i]; struct item *item; struct item_data *data; - int msg_len = strlen(msg->body), len, count = 0; + int msg_len = strlen(msg->body), len; #if PACKETVER >= 20150513 - int offset, j, itemsize; + int offset, j, itemsize, count = 0; #endif if( msg_len == 0 ) { diff --git a/src/map/mail.c b/src/map/mail.c index 1880f221ac..55483455d5 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -132,7 +132,10 @@ enum mail_attach_result mail_setitem(struct map_session_data *sd, short idx, uin // clif_updatestatus(sd, SP_ZENY); return MAIL_ATTACH_SUCCESS; } else { // Item Transfer - int i, j, total = 0; + int i; +#if PACKETVER >= 20150513 + int j, total = 0; +#endif idx -= 2;