diff options
author | Haru <haru@dotalux.com> | 2018-06-29 06:32:55 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2018-07-01 21:09:26 +0200 |
commit | a6292d5eaf34e39ce8dcb7c8a260cc1772eb536c (patch) | |
tree | 5ba4fbd5fcfe667a26101fa3e72e0e5529a6c336 /src | |
parent | a675e06c38ec4e31a2758435a582b58a2199cfc4 (diff) | |
download | hercules-a6292d5eaf34e39ce8dcb7c8a260cc1772eb536c.tar.gz hercules-a6292d5eaf34e39ce8dcb7c8a260cc1772eb536c.tar.bz2 hercules-a6292d5eaf34e39ce8dcb7c8a260cc1772eb536c.tar.xz hercules-a6292d5eaf34e39ce8dcb7c8a260cc1772eb536c.zip |
Fix some warnings caused by static functions defined and unused
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/map/chrif.c | 2 | ||||
-rw-r--r-- | src/map/clif.c | 9 | ||||
-rw-r--r-- | src/map/status.c | 8 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index e6fb9b0a8..2aa76ca2d 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -109,6 +109,7 @@ struct chrif_interface *chrif; //This define should spare writing the check in every function. [Skotlex] #define chrif_check(a) do { if(!chrif->isconnected()) return a; } while(0) +#if 0 // Unused /// Resets all the data. static void chrif_reset(void) __attribute__ ((noreturn)); static void chrif_reset(void) @@ -116,6 +117,7 @@ static void chrif_reset(void) // TODO kick everyone out and reset everything [FlavioJS] exit(EXIT_FAILURE); } +#endif // 0 /// Checks the conditions for the server to stop. /// Releases the cookie when all characters are saved. diff --git a/src/map/clif.c b/src/map/clif.c index f8600cf02..adc7562e1 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -251,6 +251,7 @@ static void clif_setport(uint16 port) clif->map_port = port; } +#if 0 // Unused function /*========================================== * Returns map server IP *------------------------------------------*/ @@ -258,7 +259,9 @@ static uint32 clif_getip(void) { return clif->map_ip; } +#endif // 0 +#if 0 // Unused function /*========================================== * Returns map port which is set by clif_setport() *------------------------------------------*/ @@ -266,6 +269,8 @@ static uint16 clif_getport(void) { return clif->map_port; } +#endif // 0 + /*========================================== * Updates server ip resolution and returns it *------------------------------------------*/ @@ -12405,6 +12410,7 @@ static void clif_parse_CloseKafra(int fd, struct map_session_data *sd) gstorage->close(sd); } +#if 0 // Unused function /// Displays kafra storage password dialog (ZC_REQ_STORE_PASSWORD). /// 023a <info>.W /// info: @@ -12424,6 +12430,7 @@ static void clif_storagepassword(struct map_session_data *sd, short info) WFIFOW(fd,2) = info; WFIFOSET(fd,packet_len(0x23a)); } +#endif // 0 static void clif_parse_StoragePassword(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); /// Answer to the kafra storage password dialog (CZ_ACK_STORE_PASSWORD). @@ -12437,6 +12444,7 @@ static void clif_parse_StoragePassword(int fd, struct map_session_data *sd) //TODO } +#if 0 // Unused function /// Result of kafra storage password validation (ZC_RESULT_STORE_PASSWORD). /// 023c <result>.W <error count>.W /// result: @@ -12459,6 +12467,7 @@ static void clif_storagepassword_result(struct map_session_data *sd, short resul WFIFOW(fd,4) = error_count; WFIFOSET(fd,packet_len(0x23c)); } +#endif // 0 static void clif_parse_CreateParty(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); /// Party creation request diff --git a/src/map/status.c b/src/map/status.c index f949efd9f..2bd3700b3 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4459,7 +4459,12 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct static unsigned short status_base_matk_min(const struct status_data *st) { nullpo_ret(st); +#ifdef RENEWAL + Assert_ret(0); + return 0; +#else // not RENEWAL return st->int_ + (st->int_ / 7) * (st->int_ / 7); +#endif // RENEWAL } static unsigned short status_base_matk_max(const struct status_data *st) @@ -4485,6 +4490,7 @@ static unsigned short status_base_matk(struct block_list *bl, const struct statu return st->int_ + (st->int_ / 2) + (st->dex / 5) + (st->luk / 3) + (level / 4); } #else + Assert_ret(0); return 0; #endif } @@ -13786,8 +13792,6 @@ void status_defaults(void) status->read_job_db_sub = status_read_job_db_sub; status->set_sc = status_set_sc; status->copy = status_copy; -#ifndef RENEWAL status->base_matk_min = status_base_matk_min; -#endif // RENEWAL status->base_matk_max = status_base_matk_max; } |