From 4d6327d1f40e86fc0524545700c928e3434cfc0e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 15 May 2019 20:22:31 +0300 Subject: Fix warnings in clang 3.9 --- src/emap/clif.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/emap/clif.c b/src/emap/clif.c index aa82932..9bdb6b8 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -545,7 +545,8 @@ void eclif_homname_ack_pre(int *fdPtr, struct block_list **blPtr) nullpo_retv(bl); Assert_retv(bl->type == BL_HOM); - struct packet_reqname_ack packet = { 0 }; + struct packet_reqname_ack packet; + memset(&packet, 0, sizeof(packet)); packet.packet_id = reqName; packet.gid = bl->id; memcpy(packet.name, BL_UCCAST(BL_HOM, bl)->homunculus.name, NAME_LENGTH); @@ -569,7 +570,8 @@ void eclif_mername_ack_pre(int *fdPtr, struct block_list **blPtr) nullpo_retv(bl); Assert_retv(bl->type == BL_MER); - struct packet_reqname_ack packet = { 0 }; + struct packet_reqname_ack packet; + memset(&packet, 0, sizeof(packet)); packet.packet_id = reqName; packet.gid = bl->id; memcpy(packet.name, BL_UCCAST(BL_MER, bl)->db->name, NAME_LENGTH); @@ -593,7 +595,8 @@ void eclif_petname_ack_pre(int *fdPtr, struct block_list **blPtr) nullpo_retv(bl); Assert_retv(bl->type == BL_PET); - struct packet_reqname_ack packet = { 0 }; + struct packet_reqname_ack packet; + memset(&packet, 0, sizeof(packet)); packet.packet_id = reqName; packet.gid = bl->id; memcpy(packet.name, BL_UCCAST(BL_PET, bl)->pet.name, NAME_LENGTH); @@ -617,7 +620,8 @@ void eclif_elemname_ack_pre(int *fdPtr, struct block_list **blPtr) nullpo_retv(bl); Assert_retv(bl->type == BL_ELEM); - struct packet_reqname_ack packet = { 0 }; + struct packet_reqname_ack packet; + memset(&packet, 0, sizeof(packet)); packet.packet_id = reqName; packet.gid = bl->id; memcpy(packet.name, BL_UCCAST(BL_ELEM, bl)->db->name, NAME_LENGTH); -- cgit v1.2.3-70-g09d2