Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Veksler <Mihails.Vekslers@zabbix.com>2017-12-11 16:54:41 +0300
committerMichael Veksler <Mihails.Vekslers@zabbix.com>2017-12-11 16:54:41 +0300
commit1d026ab2be525343fbd353b21c1acdb160385e65 (patch)
tree3cbaed30a55757a47562450713580716cd489503 /include
parent82a5f5d62d8ca710344d166365952fe4687e438d (diff)
...G...PS. [ZBX-12671] refactoring the code base to support the compiler flag -Wstrict-prototypes
Diffstat (limited to 'include')
-rw-r--r--include/alias.h4
-rw-r--r--include/common.h2
-rw-r--r--include/module.h18
-rw-r--r--include/service.h8
-rw-r--r--include/symbols.h2
-rw-r--r--include/sysinfo.h10
-rw-r--r--include/threads.h6
7 files changed, 25 insertions, 25 deletions
diff --git a/include/alias.h b/include/alias.h
index 8c6bcb73b9b..bb8bec43269 100644
--- a/include/alias.h
+++ b/include/alias.h
@@ -28,9 +28,9 @@ typedef struct zbx_alias
}
ALIAS;
-void test_aliases();
+void test_aliases(void);
void add_alias(const char *name, const char *value);
-void alias_list_free();
+void alias_list_free(void);
const char *zbx_alias_get(const char *orig);
#endif /* ZABBIX_ALIAS_H */
diff --git a/include/common.h b/include/common.h
index 2c058654873..b7d1c2a1968 100644
--- a/include/common.h
+++ b/include/common.h
@@ -1128,7 +1128,7 @@ void uint64_array_remove(zbx_uint64_t *values, int *num, const zbx_uint64_t *rm_
const char *zbx_event_value_string(unsigned char source, unsigned char object, unsigned char value);
#ifdef _WINDOWS
-const OSVERSIONINFOEX *zbx_win_getversion();
+const OSVERSIONINFOEX *zbx_win_getversion(void);
void zbx_wmi_get(const char *wmi_namespace, const char *wmi_query, char **utf8_value);
wchar_t *zbx_acp_to_unicode(const char *acp_string);
wchar_t *zbx_oemcp_to_unicode(const char *oemcp_string);
diff --git a/include/module.h b/include/module.h
index 4419d6cb385..a7e7d872318 100644
--- a/include/module.h
+++ b/include/module.h
@@ -45,15 +45,6 @@
#define CF_MODULE 0x02 /* item is defined in a loadable module */
#define CF_USERPARAMETER 0x04 /* item is defined as user parameter */
-typedef struct
-{
- char *key;
- unsigned flags;
- int (*function)();
- char *test_param; /* item test parameters; user parameter items keep command here */
-}
-ZBX_METRIC;
-
/* agent request structure */
typedef struct
{
@@ -99,6 +90,15 @@ typedef struct
}
AGENT_RESULT;
+typedef struct
+{
+ char *key;
+ unsigned flags;
+ int (*function)(AGENT_REQUEST *request, AGENT_RESULT *result);
+ char *test_param; /* item test parameters; user parameter items keep command here */
+}
+ZBX_METRIC;
+
/* SET RESULT */
#define SET_UI64_RESULT(res, val) \
diff --git a/include/service.h b/include/service.h
index 2063dd92c58..8e3c8f2b8b0 100644
--- a/include/service.h
+++ b/include/service.h
@@ -31,11 +31,11 @@ extern ZBX_THREAD_HANDLE *threads;
void service_start(int flags);
int ZabbixCreateService(const char *path, int multiple_agents);
-int ZabbixRemoveService();
-int ZabbixStartService();
-int ZabbixStopService();
+int ZabbixRemoveService(void);
+int ZabbixStartService(void);
+int ZabbixStopService(void);
-void set_parent_signal_handler();
+void set_parent_signal_handler(void);
int application_status; /* required for closing application from service */
diff --git a/include/symbols.h b/include/symbols.h
index b468cdf37dd..7f292442cd7 100644
--- a/include/symbols.h
+++ b/include/symbols.h
@@ -45,7 +45,7 @@ BOOL (__stdcall *zbx_GetPerformanceInfo)(PPERFORMANCE_INFORMATION, DWORD);
BOOL (__stdcall *zbx_GlobalMemoryStatusEx)(LPMEMORYSTATUSEX);
BOOL (__stdcall *zbx_GetFileInformationByHandleEx)(HANDLE, FILE_INFO_BY_HANDLE_CLASS, LPVOID, DWORD);
-void import_symbols();
+void import_symbols(void);
#else
# define import_symbols()
diff --git a/include/sysinfo.h b/include/sysinfo.h
index 97a7dc51f6b..233f32402b6 100644
--- a/include/sysinfo.h
+++ b/include/sysinfo.h
@@ -192,15 +192,15 @@ int get_diskstat(const char *devname, zbx_uint64_t *dstat);
#define PROCESS_MODULE_COMMAND 0x2
#define PROCESS_WITH_ALIAS 0x4
-void init_metrics();
+void init_metrics(void);
int add_metric(ZBX_METRIC *metric, char *error, size_t max_error_len);
-void free_metrics();
+void free_metrics(void);
int process(const char *in_command, unsigned flags, AGENT_RESULT *result);
int add_user_parameter(const char *key, char *command, char *error, size_t max_error_len);
-int add_user_module(const char *key, int (*function)());
-void test_parameters();
+int add_user_module(const char *key, int (*function)(void));
+void test_parameters(void);
void test_parameter(const char *key);
void init_result(AGENT_RESULT *result);
@@ -290,7 +290,7 @@ typedef int (*zbx_metric_func_t)(AGENT_REQUEST *request, AGENT_RESULT *result);
typedef struct
{
const char *mode;
- int (*function)();
+ int (*function)(void);
}
MODE_FUNCTION;
diff --git a/include/threads.h b/include/threads.h
index a311cc4921c..e1a7f8e8538 100644
--- a/include/threads.h
+++ b/include/threads.h
@@ -47,8 +47,8 @@
#else /* not _WINDOWS */
- int zbx_fork();
- int zbx_child_fork();
+ int zbx_fork(void);
+ int zbx_child_fork(void);
#define ZBX_THREAD_ERROR -1
@@ -87,6 +87,6 @@ zbx_thread_args_t;
ZBX_THREAD_HANDLE zbx_thread_start(ZBX_THREAD_ENTRY_POINTER(handler), zbx_thread_args_t *thread_args);
int zbx_thread_wait(ZBX_THREAD_HANDLE thread);
/* zbx_thread_exit(status) -- declared as define !!! */
-long int zbx_get_thread_id();
+long int zbx_get_thread_id(void);
#endif /* ZABBIX_THREADS_H */