Browse Source

Follow up to 58776da

Fixed a few compiler warnings.
Thanks to @RadianFord
Lemongrass3110 8 năm trước cách đây
mục cha
commit
3acf1aada3
3 tập tin đã thay đổi với 6 bổ sung5 xóa
  1. 2 2
      src/char/int_mail.c
  2. 2 3
      src/map/clif.c
  3. 2 0
      src/map/clif.h

+ 2 - 2
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

+ 2 - 3
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 <mail id>.Q <mail tab>.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;

+ 2 - 0
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 <stdarg.h>
 
 enum { // packet DB