summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-01-09 19:06:29 +0100
committerHaru <haru@dotalux.com>2016-01-09 19:11:01 +0100
commit10f9f4282097f177d6ee0b26572dcf4308e6d6fb (patch)
tree0c010c11403697a03baa4c783366e781a118ebc9 /src/map
parent25edecdacfba89de097e61fd0958236a8cd90a6b (diff)
downloadhercules-10f9f4282097f177d6ee0b26572dcf4308e6d6fb.tar.gz
hercules-10f9f4282097f177d6ee0b26572dcf4308e6d6fb.tar.bz2
hercules-10f9f4282097f177d6ee0b26572dcf4308e6d6fb.tar.xz
hercules-10f9f4282097f177d6ee0b26572dcf4308e6d6fb.zip
Corrected various zero-argument function definitions
- Functions should always specify their arguments, even if they take none. In C, not specifying arguments is different than specifying (void). Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/itemdb.c3
-rw-r--r--src/map/itemdb.h2
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/mob.h2
-rw-r--r--src/map/pet.c2
-rw-r--r--src/map/pet.h2
6 files changed, 7 insertions, 6 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 048efd636..6b888c23e 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1254,7 +1254,8 @@ int itemdb_combo_split_atoi (char *str, int *val) {
/**
* <combo{:combo{:combo:{..}}}>,<{ script }>
**/
-void itemdb_read_combos() {
+void itemdb_read_combos(void)
+{
uint32 lines = 0, count = 0;
char line[1024];
char filepath[256];
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index d751451c6..cde73f3b4 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -626,7 +626,7 @@ struct itemdb_interface {
int (*isidentified) (int nameid);
int (*isidentified2) (struct item_data *data);
int (*combo_split_atoi) (char *str, int *val);
- void (*read_combos) ();
+ void (*read_combos) (void);
int (*gendercheck) (struct item_data *id);
int (*validate_entry) (struct item_data *entry, int n, const char *source);
void (*readdb_additional_fields) (int itemid, config_setting_t *it, int n, const char *source);
diff --git a/src/map/mob.c b/src/map/mob.c
index 37da81a15..4ed69ad01 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -4922,7 +4922,7 @@ void mob_reload(void) {
/**
* Clears spawn related information for a script reload.
*/
-void mob_clear_spawninfo()
+void mob_clear_spawninfo(void)
{
int i;
for (i = 0; i < MAX_MOB_DB; i++)
diff --git a/src/map/mob.h b/src/map/mob.h
index 5485b2a91..77218bf4a 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -528,7 +528,7 @@ struct mob_interface {
bool (*readdb_race2) (char *fields[], int columns, int current);
bool (*readdb_itemratio) (char *str[], int columns, int current);
void (*load) (bool minimal);
- void (*clear_spawninfo) ();
+ void (*clear_spawninfo) (void);
void (*destroy_mob_db) (int index);
};
diff --git a/src/map/pet.c b/src/map/pet.c
index db8d0d1f1..c6f7e8cca 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1178,7 +1178,7 @@ int pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) {
/**
* Loads (or reloads) the pet database.
*/
-int read_petdb()
+int read_petdb(void)
{
const char *filename[] = {
DBPATH"pet_db.txt",
diff --git a/src/map/pet.h b/src/map/pet.h
index 2442a381f..83e39a887 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -166,7 +166,7 @@ struct pet_interface {
int (*skill_bonus_timer) (int tid, int64 tick, int id, intptr_t data);
int (*recovery_timer) (int tid, int64 tick, int id, intptr_t data);
int (*skill_support_timer) (int tid, int64 tick, int id, intptr_t data);
- int (*read_db) ();
+ int (*read_db) (void);
};
#ifdef HERCULES_CORE