summaryrefslogtreecommitdiff
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
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>
-rw-r--r--src/char/char.h4
-rw-r--r--src/common/mutex.h4
-rw-r--r--src/common/socket.c12
-rw-r--r--src/login/login.c2
-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
-rw-r--r--src/plugins/dbghelpplug.c6
11 files changed, 21 insertions, 20 deletions
diff --git a/src/char/char.h b/src/char/char.h
index 3d25ec465..ff46e4353 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -317,8 +317,8 @@ extern char char_reg_num_db[32];
extern int guild_exp_rate;
extern int log_inter;
-void char_load_defaults();
-void char_defaults();
+void char_load_defaults(void);
+void char_defaults(void);
#endif // HERCULES_CORE
HPShared struct char_interface *chr;
diff --git a/src/common/mutex.h b/src/common/mutex.h
index 5127d9f4b..e49791493 100644
--- a/src/common/mutex.h
+++ b/src/common/mutex.h
@@ -32,7 +32,7 @@ typedef struct racond racond; // Condition Var
*
* @return not NULL
*/
-ramutex *ramutex_create();
+ramutex *ramutex_create(void);
/**
* Destroys a Mutex
@@ -70,7 +70,7 @@ void ramutex_unlock(ramutex *m);
*
* @return not NULL
*/
-racond *racond_create();
+racond *racond_create(void);
/**
* Destroy a Condition variable
diff --git a/src/common/socket.c b/src/common/socket.c
index f67c3d074..ad90355a3 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -76,11 +76,11 @@ struct socket_interface *sockt;
struct socket_data **session;
#ifdef SEND_SHORTLIST
- // Add a fd to the shortlist so that it'll be recognized as a fd that needs
- // sending done on it.
- void send_shortlist_add_fd(int fd);
- // Do pending network sends (and eof handling) from the shortlist.
- void send_shortlist_do_sends();
+// Add a fd to the shortlist so that it'll be recognized as a fd that needs
+// sending done on it.
+void send_shortlist_add_fd(int fd);
+// Do pending network sends (and eof handling) from the shortlist.
+void send_shortlist_do_sends(void);
#endif
/////////////////////////////////////////////////////////////////////
@@ -1570,7 +1570,7 @@ void send_shortlist_add_fd(int fd)
}
// Do pending network sends and eof handling from the shortlist.
-void send_shortlist_do_sends()
+void send_shortlist_do_sends(void)
{
int i;
diff --git a/src/login/login.c b/src/login/login.c
index e478d0252..609eb5fe9 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1701,7 +1701,7 @@ int login_parse_login(int fd)
}
-void login_set_defaults()
+void login_set_defaults(void)
{
login_config.login_ip = INADDR_ANY;
login_config.login_port = 6900;
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
diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c
index edd47814d..6c02b1a12 100644
--- a/src/plugins/dbghelpplug.c
+++ b/src/plugins/dbghelpplug.c
@@ -1581,7 +1581,7 @@ typedef BOOL (WINAPI *ISDEBUGGERPRESENT)(void);
///
/// @return TRUE is a debugger is present
static BOOL
-Dhp__IsDebuggerPresent()
+Dhp__IsDebuggerPresent(void)
{
HANDLE kernel32_dll;
ISDEBUGGERPRESENT IsDebuggerPresent_;
@@ -1606,7 +1606,7 @@ Dhp__IsDebuggerPresent()
///
/// @return TRUE is sucessfull
static BOOL
-Dhp__LoadDbghelpDll()
+Dhp__LoadDbghelpDll(void)
{
dbghelp_dll = LoadLibraryA(DBGHELP_DLL);
if( dbghelp_dll != INVALID_HANDLE_VALUE )
@@ -1663,7 +1663,7 @@ Dhp__LoadDbghelpDll()
/// Unloads the dbghelp.dll library.
static VOID
-Dhp__UnloadDbghlpDll()
+Dhp__UnloadDbghlpDll(void)
{
if( !SymCleanup_(GetCurrentProcess()) )
printf("Failed to cleanup symbols! Error: %u\n", GetLastError());