diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-24 22:49:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-24 22:49:15 +0300 |
commit | 82293aa84c93ba1cbe822387a5cde55b979ffcb6 (patch) | |
tree | 3aca32ed267aab13752f068ec7f157470725bed9 | |
parent | e29cfffbcd79f5cc8d2beea5434a4594f2353187 (diff) | |
download | evol-hercules-82293aa84c93ba1cbe822387a5cde55b979ffcb6.tar.gz evol-hercules-82293aa84c93ba1cbe822387a5cde55b979ffcb6.tar.bz2 evol-hercules-82293aa84c93ba1cbe822387a5cde55b979ffcb6.tar.xz evol-hercules-82293aa84c93ba1cbe822387a5cde55b979ffcb6.zip |
Fix compilation warnings.
-rw-r--r-- | src/map/clif.c | 19 | ||||
-rw-r--r-- | src/map/parse.c | 5 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/send.c | 4 | ||||
-rw-r--r-- | src/map/status.c | 3 |
5 files changed, 24 insertions, 11 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 25bf56f..a1be1f8 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -157,14 +157,15 @@ void eclif_authok_post(struct map_session_data *sd) send_mapmask(sd->fd, mask); } -void eclif_changemap_post(struct map_session_data *sd, short *m, int *x, int *y) +void eclif_changemap_post(struct map_session_data *sd, short *m, + int *x __attribute__ ((unused)), int *y __attribute__ ((unused))) { - struct MapdExt *data = mapd_get(sd->bl.m); + struct MapdExt *data = mapd_get(*m); int mask = data ? data->mask : 1; send_mapmask(sd->fd, mask); } -void eclif_handle_invisible_map(struct block_list *bl, enum send_target target) +void eclif_handle_invisible_map(struct block_list *bl, enum send_target target __attribute__ ((unused))) { if (!bl || bl->type != BL_PC) return; @@ -173,14 +174,22 @@ void eclif_handle_invisible_map(struct block_list *bl, enum send_target target) hookStop(); } -void eclif_sendlook(struct block_list *bl, int *id, int *type, int *val, int *val2, enum send_target *target) +void eclif_sendlook(struct block_list *bl, + int *id __attribute__ ((unused)), + int *type __attribute__ ((unused)), + int *val __attribute__ ((unused)), + int *val2 __attribute__ ((unused)), + enum send_target *target) { if (*target == SELF) return; eclif_handle_invisible_map(bl, *target); } -bool eclif_send(const void* buf, int *len, struct block_list* bl, enum send_target *type) +bool eclif_send(const void* buf __attribute__ ((unused)), + int *len __attribute__ ((unused)), + struct block_list* bl, + enum send_target *type) { if (*type == SELF) return true; diff --git a/src/map/parse.c b/src/map/parse.c index a3fdc07..a2155b1 100644 --- a/src/map/parse.c +++ b/src/map/parse.c @@ -14,6 +14,7 @@ #include "../../../map/pc.h" #include "map/parse.h" +#include "map/send.h" #include "map/data/session.h" #include "map/struct/sessionext.h" @@ -33,7 +34,7 @@ void map_parse_join_channel(int fd) if (!sd) return; - safestrncpy(name, RFIFOP(fd, 2), 24); + safestrncpy(name, (char*)RFIFOP(fd, 2), 24); if (name[0] == '#') p = name + 1; else @@ -99,7 +100,7 @@ void map_parse_part_channel(int fd) if (!sd) return; - safestrncpy(name, RFIFOP(fd, 2), 24); + safestrncpy(name, (char*)RFIFOP(fd, 2), 24); if (name[0] == '#') p = name + 1; else diff --git a/src/map/pc.c b/src/map/pc.c index 6272f40..b593682 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -105,7 +105,9 @@ void epc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int *p hookStop(); \ } -void epc_unequipitem_pos(struct map_session_data *sd, int *nPtr, int *posPtr) +void epc_unequipitem_pos(struct map_session_data *sd, + int *nPtr __attribute__ ((unused)), + int *posPtr) { int pos = *posPtr; diff --git a/src/map/send.c b/src/map/send.c index 0e281b6..06e0cfc 100644 --- a/src/map/send.c +++ b/src/map/send.c @@ -180,7 +180,7 @@ void send_changenpc_title (struct map_session_data *sd, const int npcId, const c WFIFOW (fd, 2) = sz; WFIFOL (fd, 4) = npcId; WFIFOW (fd, 8) = len; - strcpy (WFIFOP (fd, 10), name); + strcpy ((char*)WFIFOP (fd, 10), name); WFIFOSET (fd, sz); } @@ -188,7 +188,7 @@ void send_join_ack(int fd, const char *const name, int flag) { WFIFOHEAD (fd, 27); WFIFOW (fd, 0) = 0xb08; - safestrncpy (WFIFOP (fd, 2), name, 24); + safestrncpy ((char*)WFIFOP (fd, 2), name, 24); WFIFOB (fd, 26) = flag; WFIFOSET (fd, 27); } diff --git a/src/map/status.c b/src/map/status.c index 8bb6ead..fa18d39 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -17,7 +17,8 @@ #include "map/data/npcd.h" #include "map/struct/npcdext.h" -void estatus_set_viewdata_post(struct block_list *bl, int *class_) +void estatus_set_viewdata_post(struct block_list *bl, + int *class_ __attribute__ ((unused))) { if (!bl) return; |