From 3acf1aada3e208534485889fadefaaebfbbf6e92 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Wed, 21 Jun 2017 15:07:37 +0200 Subject: [PATCH] Follow up to 58776da Fixed a few compiler warnings. Thanks to @RadianFord --- src/char/int_mail.c | 4 ++-- src/map/clif.c | 5 ++--- src/map/clif.h | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 7944e755f5..0420ffed5a 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -539,12 +539,10 @@ static void mapif_parse_Mail_send(int fd) { struct mail_message msg; char esc_name[NAME_LENGTH*2+1]; - uint32 account_id = 0; if(RFIFOW(fd,2) != 8 + sizeof(struct mail_message)) return; - account_id = RFIFOL(fd,4); memcpy(&msg, RFIFOP(fd,8), sizeof(struct mail_message)); // Try to find the Dest Char by Name @@ -556,6 +554,8 @@ static void mapif_parse_Mail_send(int fd) { char *data; #if PACKETVER < 20150513 + uint32 account_id = RFIFOL(fd,4); + Sql_GetData(sql_handle, 0, &data, NULL); if (atoi(data) != account_id) { // Cannot send mail to char in the same account diff --git a/src/map/clif.c b/src/map/clif.c index a4b06fe3c9..93198c74b7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -15307,7 +15307,7 @@ void clif_parse_Mail_read(int fd, struct map_session_data *sd){ #if PACKETVER < 20150513 int mail_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); #else - uint8 openType = RFIFOB(fd, 2); + //uint8 openType = RFIFOB(fd, 2); int mail_id = (int)RFIFOQ(fd, 3); #endif @@ -15393,7 +15393,6 @@ void clif_parse_Mail_Receiver_Check(int fd, struct map_session_data *sd) { /// 09f3 .Q .B (CZ_REQ_ITEM_FROM_MAIL) void clif_parse_Mail_getattach( int fd, struct map_session_data *sd ){ int i; - bool fail = false; struct mail_message* msg; #if PACKETVER < 20150513 int mail_id = RFIFOL(fd, packet_db[sd->packet_ver][RFIFOW(fd, 0)].pos[0]); @@ -15495,7 +15494,7 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd){ #if PACKETVER < 20150513 int mail_id = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); #else - int openType = RFIFOB(fd, 2); + //int openType = RFIFOB(fd, 2); int mail_id = (int)RFIFOQ(fd, 3); #endif int i, j; diff --git a/src/map/clif.h b/src/map/clif.h index c1a5465c07..23afc87999 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -32,6 +32,8 @@ struct quest; struct party_booking_ad_info; enum e_party_member_withdraw; struct sale_item_data; +enum mail_inbox_type; +struct mail_message; #include enum { // packet DB