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:
authorAlexander Vladishev <aleksander.vladishev@zabbix.com>2020-06-02 16:14:03 +0300
committerAlexander Vladishev <aleksander.vladishev@zabbix.com>2020-06-02 16:14:18 +0300
commit7417609a882af4929821c23eb8aca22cf3b6ad80 (patch)
treeb86e8c74570a8b9c8520dcdabfde76f13af00bcc /include
parent1d996822fdbccf68698a319924ae003bec93c692 (diff)
...G...PS. [DEV-1570] fixed multiple funcArgNamesDifferent cppcheck warnings
(cherry picked from commit fe50c591d19db5ee990a680ee7bc9b7eb224999b)
Diffstat (limited to 'include')
-rw-r--r--include/common.h26
-rw-r--r--include/db.h6
-rw-r--r--include/dbcache.h15
-rw-r--r--include/perfmon.h4
-rw-r--r--include/proxy.h4
-rw-r--r--include/sysinfo.h2
-rw-r--r--include/zbxalgo.h2
-rw-r--r--include/zbxdb.h4
-rw-r--r--include/zbxexec.h2
-rw-r--r--include/zbxhistory.h2
-rw-r--r--include/zbxjson.h2
-rw-r--r--include/zbxprometheus.h6
-rw-r--r--include/zbxregexp.h2
-rw-r--r--include/zbxself.h6
-rw-r--r--include/zbxserver.h6
-rw-r--r--include/zbxtasks.h4
16 files changed, 47 insertions, 46 deletions
diff --git a/include/common.h b/include/common.h
index c876c83c166..ec257c99ad9 100644
--- a/include/common.h
+++ b/include/common.h
@@ -553,7 +553,7 @@ const char *get_program_type_string(unsigned char program_type);
#define ZBX_PROCESS_TYPE_ALERTSYNCER 30
#define ZBX_PROCESS_TYPE_COUNT 31 /* number of process types */
#define ZBX_PROCESS_TYPE_UNKNOWN 255
-const char *get_process_type_string(unsigned char process_type);
+const char *get_process_type_string(unsigned char proc_type);
int get_process_type_by_name(const char *proc_type_str);
/* maintenance */
@@ -991,7 +991,7 @@ char *string_replace(const char *str, const char *sub_str1, const char *sub_str2
int is_double_suffix(const char *str, unsigned char flags);
int is_double(const char *str, double *value);
#define ZBX_LENGTH_UNLIMITED 0x7fffffff
-int is_time_suffix(const char *c, int *value, int length);
+int is_time_suffix(const char *str, int *value, int length);
int is_uint_n_range(const char *str, size_t n, void *value, size_t size, zbx_uint64_t min, zbx_uint64_t max);
int is_hex_n_range(const char *str, size_t n, void *value, size_t size, zbx_uint64_t min, zbx_uint64_t max);
@@ -1034,9 +1034,9 @@ char *zbx_str_printable_dyn(const char *text);
#define ZBX_WHITESPACE " \t\r\n"
#define zbx_remove_whitespace(str) zbx_remove_chars(str, ZBX_WHITESPACE)
void del_zeros(char *s);
-int get_param(const char *param, int num, char *buf, size_t max_len, zbx_request_parameter_type_t *type);
-int num_param(const char *param);
-char *get_param_dyn(const char *param, int num, zbx_request_parameter_type_t *type);
+int get_param(const char *p, int num, char *buf, size_t max_len, zbx_request_parameter_type_t *type);
+int num_param(const char *p);
+char *get_param_dyn(const char *p, int num, zbx_request_parameter_type_t *type);
/******************************************************************************
* *
@@ -1217,11 +1217,11 @@ typedef struct
}
zbx_iprange_t;
-int iprange_parse(zbx_iprange_t *range, const char *address);
-void iprange_first(const zbx_iprange_t *range, int *address);
-int iprange_next(const zbx_iprange_t *range, int *address);
-int iprange_validate(const zbx_iprange_t *range, const int *address);
-zbx_uint64_t iprange_volume(const zbx_iprange_t *range);
+int iprange_parse(zbx_iprange_t *iprange, const char *address);
+void iprange_first(const zbx_iprange_t *iprange, int *address);
+int iprange_next(const zbx_iprange_t *iprange, int *address);
+int iprange_validate(const zbx_iprange_t *iprange, const int *address);
+zbx_uint64_t iprange_volume(const zbx_iprange_t *iprange);
/* time related functions */
char *zbx_age2str(int age);
@@ -1351,7 +1351,7 @@ char *zbx_user_macro_quote_context_dyn(const char *context, int force_quote);
#define ZBX_SESSION_ACTIVE 0
#define ZBX_SESSION_PASSIVE 1
-char *zbx_dyn_escape_shell_single_quote(const char *text);
+char *zbx_dyn_escape_shell_single_quote(const char *arg);
#define ZBX_DO_NOT_SEND_RESPONSE 0
#define ZBX_SEND_RESPONSE 1
@@ -1602,8 +1602,8 @@ zbx_variant_t;
void zbx_variant_clear(zbx_variant_t *value);
void zbx_variant_set_none(zbx_variant_t *value);
void zbx_variant_set_str(zbx_variant_t *value, char *text);
-void zbx_variant_set_dbl(zbx_variant_t *value, double dbl);
-void zbx_variant_set_ui64(zbx_variant_t *value, zbx_uint64_t ui64);
+void zbx_variant_set_dbl(zbx_variant_t *value, double value_dbl);
+void zbx_variant_set_ui64(zbx_variant_t *value, zbx_uint64_t value_ui64);
void zbx_variant_set_bin(zbx_variant_t *value, void *value_bin);
void zbx_variant_copy(zbx_variant_t *value, const zbx_variant_t *source);
int zbx_variant_set_numeric(zbx_variant_t *value, const char *text);
diff --git a/include/db.h b/include/db.h
index f7589a43bb2..ef10133d1a8 100644
--- a/include/db.h
+++ b/include/db.h
@@ -559,8 +559,8 @@ typedef struct
}
zbx_trigger_diff_t;
-void zbx_process_triggers(zbx_vector_ptr_t *triggers, zbx_vector_ptr_t *diffs);
-void zbx_db_save_trigger_changes(const zbx_vector_ptr_t *diffs);
+void zbx_process_triggers(zbx_vector_ptr_t *triggers, zbx_vector_ptr_t *trigger_diff);
+void zbx_db_save_trigger_changes(const zbx_vector_ptr_t *trigger_diff);
void zbx_trigger_diff_free(zbx_trigger_diff_t *diff);
void zbx_append_trigger_diff(zbx_vector_ptr_t *trigger_diff, zbx_uint64_t triggerid, unsigned char priority,
zbx_uint64_t flags, unsigned char value, unsigned char state, int lastchange, const char *error);
@@ -637,7 +637,7 @@ zbx_conn_flags_t;
zbx_uint64_t DBadd_interface(zbx_uint64_t hostid, unsigned char type, unsigned char useip, const char *ip,
const char *dns, unsigned short port, zbx_conn_flags_t flags);
-void DBadd_interface_snmp(const zbx_uint64_t interfaceid, const unsigned char type, const unsigned char bulk,
+void DBadd_interface_snmp(const zbx_uint64_t interfaceid, const unsigned char version, const unsigned char bulk,
const char *community, const char *securityname, const unsigned char securitylevel,
const char *authpassphrase, const char *privpassphrase, const unsigned char authprotocol,
const unsigned char privprotocol, const char *contextname);
diff --git a/include/dbcache.h b/include/dbcache.h
index 60cd5b7e770..a8d07496857 100644
--- a/include/dbcache.h
+++ b/include/dbcache.h
@@ -747,14 +747,14 @@ void DCget_autoregistration_psk(char *psk_identity_buf, size_t psk_identity_buf_
#define ZBX_MACRO_SECRET_MASK "******"
-void DCget_user_macro(const zbx_uint64_t *hostids, int host_num, const char *macro, char **replace_to);
+void DCget_user_macro(const zbx_uint64_t *hostids, int hostids_num, const char *macro, char **replace_to);
char *DCexpression_expand_user_macros(const char *expression);
int DChost_activate(zbx_uint64_t hostid, unsigned char agent_type, const zbx_timespec_t *ts,
zbx_agent_availability_t *in, zbx_agent_availability_t *out);
-int DChost_deactivate(zbx_uint64_t hostid, unsigned char agent, const zbx_timespec_t *ts,
- zbx_agent_availability_t *in, zbx_agent_availability_t *out, const char *error);
+int DChost_deactivate(zbx_uint64_t hostid, unsigned char agent_type, const zbx_timespec_t *ts,
+ zbx_agent_availability_t *in, zbx_agent_availability_t *out, const char *error_msg);
#define ZBX_QUEUE_FROM_DEFAULT 6 /* default lower limit for delay (in seconds) */
#define ZBX_QUEUE_TO_INFINITY -1 /* no upper limit for delay */
@@ -807,7 +807,7 @@ int DCget_hosts_availability(zbx_vector_ptr_t *hosts, int *ts);
void DCtouch_hosts_availability(const zbx_vector_uint64_t *hostids);
void zbx_host_availability_init(zbx_host_availability_t *availability, zbx_uint64_t hostid);
-void zbx_host_availability_clean(zbx_host_availability_t *availability);
+void zbx_host_availability_clean(zbx_host_availability_t *ha);
void zbx_host_availability_free(zbx_host_availability_t *availability);
int zbx_host_availability_is_set(const zbx_host_availability_t *ha);
@@ -856,7 +856,7 @@ typedef struct
zbx_hc_item_t;
void zbx_free_tag(zbx_tag_t *tag);
-void zbx_free_item_tag(zbx_item_tag_t *host_tag);
+void zbx_free_item_tag(zbx_item_tag_t *item_tag);
int zbx_dc_get_active_proxy_by_name(const char *name, DC_PROXY *proxy, char **error);
void zbx_dc_update_proxy_version(zbx_uint64_t hostid, int version);
@@ -894,7 +894,7 @@ zbx_trigger_dep_t;
void zbx_dc_get_trigger_dependencies(const zbx_vector_uint64_t *triggerids, zbx_vector_ptr_t *deps);
-void zbx_dc_reschedule_items(const zbx_vector_uint64_t *itemids, int now, zbx_uint64_t *proxy_hostids);
+void zbx_dc_reschedule_items(const zbx_vector_uint64_t *itemids, int nextcheck, zbx_uint64_t *proxy_hostids);
void zbx_dc_get_timer_triggerids(zbx_vector_uint64_t *triggerids, int now, int limit);
void zbx_dc_get_timer_triggers_by_triggerids(zbx_hashset_t *trigger_info, zbx_vector_ptr_t *trigger_order,
@@ -975,7 +975,8 @@ int zbx_lld_macro_value_by_name(const struct zbx_json_parse *jp_row, const zbx_v
const char *macro, char **value);
int zbx_lld_macro_paths_compare(const void *d1, const void *d2);
-void zbx_dc_get_item_tags_by_functionids(const zbx_uint64_t *functionids, size_t functionids_num, zbx_vector_ptr_t *host_tags);
+void zbx_dc_get_item_tags_by_functionids(const zbx_uint64_t *functionids, size_t functionids_num,
+ zbx_vector_ptr_t *item_tags);
unsigned char zbx_dc_set_macro_env(unsigned char env);
diff --git a/include/perfmon.h b/include/perfmon.h
index 52b1c704269..00704c97315 100644
--- a/include/perfmon.h
+++ b/include/perfmon.h
@@ -89,8 +89,8 @@ PDH_STATUS calculate_counter_value(const char *function, const char *counterpath
wchar_t *get_counter_name(DWORD pdhIndex);
int check_counter_path(char *counterPath, int convert_from_numeric);
int init_builtin_counter_indexes(void);
-DWORD get_builtin_object_index(zbx_builtin_counter_ref_t ref);
-DWORD get_builtin_counter_index(zbx_builtin_counter_ref_t ref);
+DWORD get_builtin_object_index(zbx_builtin_counter_ref_t counter_ref);
+DWORD get_builtin_counter_index(zbx_builtin_counter_ref_t counter_ref);
wchar_t *get_all_counter_names(HKEY reg_key, wchar_t *reg_value_name);
#define get_builtin_object_name(ctr) get_counter_name(get_builtin_object_index(ctr))
diff --git a/include/proxy.h b/include/proxy.h
index 9ac9d41a12f..19702eab7a6 100644
--- a/include/proxy.h
+++ b/include/proxy.h
@@ -42,8 +42,8 @@ void update_proxy_lastaccess(const zbx_uint64_t hostid, time_t last_access);
int get_proxyconfig_data(zbx_uint64_t proxy_hostid, struct zbx_json *j, char **error);
void process_proxyconfig(struct zbx_json_parse *jp_data);
-int get_host_availability_data(struct zbx_json *j, int *ts);
-int process_host_availability(struct zbx_json_parse *jp_data, char **error);
+int get_host_availability_data(struct zbx_json *json, int *ts);
+int process_host_availability(struct zbx_json_parse *jp, char **error);
int proxy_get_hist_data(struct zbx_json *j, zbx_uint64_t *lastid, int *more);
int proxy_get_dhis_data(struct zbx_json *j, zbx_uint64_t *lastid, int *more);
diff --git a/include/sysinfo.h b/include/sysinfo.h
index c6eeb1b6897..51ece244f63 100644
--- a/include/sysinfo.h
+++ b/include/sysinfo.h
@@ -213,7 +213,7 @@ void free_key_access_rules(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_parameter(const char *itemkey, char *command, char *error, size_t max_error_len);
int add_user_module(const char *key, int (*function)(void));
void test_parameters(void);
void test_parameter(const char *key);
diff --git a/include/zbxalgo.h b/include/zbxalgo.h
index bcb72d2c13b..c51e84b9a7e 100644
--- a/include/zbxalgo.h
+++ b/include/zbxalgo.h
@@ -339,7 +339,7 @@ void zbx_str_free(char *data);
void uinc128_64(zbx_uint128_t *base, zbx_uint64_t value);
void uinc128_128(zbx_uint128_t *base, const zbx_uint128_t *value);
-void udiv128_64(zbx_uint128_t *result, const zbx_uint128_t *base, zbx_uint64_t value);
+void udiv128_64(zbx_uint128_t *result, const zbx_uint128_t *dividend, zbx_uint64_t value);
void umul64_64(zbx_uint128_t *result, zbx_uint64_t value, zbx_uint64_t factor);
unsigned int zbx_isqrt32(unsigned int value);
diff --git a/include/zbxdb.h b/include/zbxdb.h
index 2e5ddc745fa..a3f7871bcb3 100644
--- a/include/zbxdb.h
+++ b/include/zbxdb.h
@@ -79,13 +79,13 @@ zbx_db_value_t;
# define ZBX_ROW_DL ";\n"
#endif
-int zbx_db_init(const char *dbname, const char *const db_schema, char **error);
+int zbx_db_init(const char *dbname, const char *const dbschema, char **error);
void zbx_db_deinit(void);
void zbx_db_init_autoincrement_options(void);
int zbx_db_connect(char *host, char *user, char *password, char *dbname, char *dbschema, char *dbsocket, int port,
- char *tlsmode, char *cert, char *key, char *ca, char *cipher, char *cipher_13);
+ char *tls_connect, char *cert, char *key, char *ca, char *cipher, char *cipher_13);
void zbx_db_close(void);
int zbx_db_begin(void);
diff --git a/include/zbxexec.h b/include/zbxexec.h
index f0fdd9ed982..8af729d850a 100644
--- a/include/zbxexec.h
+++ b/include/zbxexec.h
@@ -23,7 +23,7 @@
#define ZBX_EXIT_CODE_CHECKS_DISABLED 0
#define ZBX_EXIT_CODE_CHECKS_ENABLED 1
-int zbx_execute(const char *command, char **buffer, char *error, size_t max_error_len, int timeout,
+int zbx_execute(const char *command, char **output, char *error, size_t max_error_len, int timeout,
unsigned char flag);
int zbx_execute_nowait(const char *command);
diff --git a/include/zbxhistory.h b/include/zbxhistory.h
index f89ea38402d..38dec2f89c5 100644
--- a/include/zbxhistory.h
+++ b/include/zbxhistory.h
@@ -50,7 +50,7 @@ void zbx_history_value_print(char *buffer, size_t size, const history_value_t *v
int zbx_history_init(char **error);
void zbx_history_destroy(void);
-int zbx_history_add_values(const zbx_vector_ptr_t *values);
+int zbx_history_add_values(const zbx_vector_ptr_t *history);
int zbx_history_get_values(zbx_uint64_t itemid, int value_type, int start, int count, int end,
zbx_vector_history_record_t *values);
diff --git a/include/zbxjson.h b/include/zbxjson.h
index f1845f0a070..c311cc39f3a 100644
--- a/include/zbxjson.h
+++ b/include/zbxjson.h
@@ -272,7 +272,7 @@ int zbx_json_value_by_name(const struct zbx_json_parse *jp, const char *name, c
zbx_json_type_t *type);
int zbx_json_value_by_name_dyn(const struct zbx_json_parse *jp, const char *name, char **string,
size_t *string_alloc, zbx_json_type_t *type);
-int zbx_json_brackets_open(const char *p, struct zbx_json_parse *out);
+int zbx_json_brackets_open(const char *p, struct zbx_json_parse *jp);
int zbx_json_brackets_by_name(const struct zbx_json_parse *jp, const char *name, struct zbx_json_parse *out);
int zbx_json_object_is_empty(const struct zbx_json_parse *jp);
int zbx_json_count(const struct zbx_json_parse *jp);
diff --git a/include/zbxprometheus.h b/include/zbxprometheus.h
index f9a3f92572a..360231e9911 100644
--- a/include/zbxprometheus.h
+++ b/include/zbxprometheus.h
@@ -20,9 +20,9 @@
#ifndef __zbxprometheus_h__
#define __zbxprometheus_h__
-int zbx_prometheus_pattern(const char *data, const char *filter_data, const char *output,
- char **value, char **err);
-int zbx_prometheus_to_json(const char *data, const char *filter_data, char **value, char **err);
+int zbx_prometheus_pattern(const char *data, const char *filter_data, const char *output, char **value,
+ char **error);
+int zbx_prometheus_to_json(const char *data, const char *filter_data, char **value, char **error);
int zbx_prometheus_validate_filter(const char *pattern, char **error);
int zbx_prometheus_validate_label(const char *label);
diff --git a/include/zbxregexp.h b/include/zbxregexp.h
index f849fc8ab8c..a25e56e2581 100644
--- a/include/zbxregexp.h
+++ b/include/zbxregexp.h
@@ -38,7 +38,7 @@ zbx_expression_t;
/* regular expressions */
int zbx_regexp_compile(const char *pattern, zbx_regexp_t **regexp, const char **err_msg_static);
-int zbx_regexp_compile_ext(const char *pattern, zbx_regexp_t **regexp, int flags, const char **error);
+int zbx_regexp_compile_ext(const char *pattern, zbx_regexp_t **regexp, int flags, const char **err_msg_static);
void zbx_regexp_free(zbx_regexp_t *regexp);
int zbx_regexp_match_precompiled(const char *string, const zbx_regexp_t *regexp);
char *zbx_regexp_match(const char *string, const char *pattern, int *len);
diff --git a/include/zbxself.h b/include/zbxself.h
index be6465845c2..eec30149e5b 100644
--- a/include/zbxself.h
+++ b/include/zbxself.h
@@ -44,15 +44,15 @@ typedef struct
}
zbx_process_info_t;
-int get_process_type_forks(unsigned char process_type);
+int get_process_type_forks(unsigned char proc_type);
#ifndef _WINDOWS
int init_selfmon_collector(char **error);
void free_selfmon_collector(void);
void update_selfmon_counter(unsigned char state);
void collect_selfmon_stats(void);
-void get_selfmon_stats(unsigned char process_type, unsigned char aggr_func, int process_num,
- unsigned char state, double *value);
+void get_selfmon_stats(unsigned char proc_type, unsigned char aggr_func, int proc_num, unsigned char state,
+ double *value);
int zbx_get_all_process_stats(zbx_process_info_t *stats);
void zbx_sleep_loop(int sleeptime);
void zbx_sleep_forever(void);
diff --git a/include/zbxserver.h b/include/zbxserver.h
index 4b0a2259930..f05ff721123 100644
--- a/include/zbxserver.h
+++ b/include/zbxserver.h
@@ -59,7 +59,7 @@ char *zbx_dc_expand_user_macros_in_expression(const char *text, zbx_uint64_t *ho
int get_N_functionid(const char *expression, int N_functionid, zbx_uint64_t *functionid, const char **end);
void get_functionids(zbx_vector_uint64_t *functionids, const char *expression);
-int evaluate_function(char **value, DC_ITEM *item, const char *function, const char *parameters,
+int evaluate_function(char **value, DC_ITEM *item, const char *function, const char *parameter,
const zbx_timespec_t *ts, char **error);
int substitute_simple_macros(zbx_uint64_t *actionid, const DB_EVENT *event, const DB_EVENT *r_event,
@@ -91,10 +91,10 @@ void get_trigger_expression_constant(const char *expression, const zbx_token_ref
int substitute_lld_macros(char **data, const struct zbx_json_parse *jp_row, const zbx_vector_ptr_t *lld_macro_paths,
int flags, char *error, size_t max_error_len);
int substitute_key_macros(char **data, zbx_uint64_t *hostid, DC_ITEM *dc_item, const struct zbx_json_parse *jp_row,
- const zbx_vector_ptr_t *lld_macro_paths, int macro_type, char *error, size_t mexerrlen);
+ const zbx_vector_ptr_t *lld_macro_paths, int macro_type, char *error, size_t maxerrlen);
int substitute_key_macros_unmasked(char **data, zbx_uint64_t *hostid, DC_ITEM *dc_item,
const struct zbx_json_parse *jp_row, const zbx_vector_ptr_t *lld_macro_paths, int macro_type,
- char *error, size_t mexerrlen);
+ char *error, size_t maxerrlen);
int substitute_function_lld_param(const char *e, size_t len, unsigned char key_in_param,
char **exp, size_t *exp_alloc, size_t *exp_offset, const struct zbx_json_parse *jp_row,
const zbx_vector_ptr_t *lld_macro_paths, char *error, size_t max_error_len);
diff --git a/include/zbxtasks.h b/include/zbxtasks.h
index 9602158fbf2..d2b409d0752 100644
--- a/include/zbxtasks.h
+++ b/include/zbxtasks.h
@@ -124,12 +124,12 @@ zbx_tm_task_t *zbx_tm_task_create(zbx_uint64_t taskid, unsigned char type, unsig
void zbx_tm_task_clear(zbx_tm_task_t *task);
void zbx_tm_task_free(zbx_tm_task_t *task);
-zbx_tm_remote_command_t *zbx_tm_remote_command_create(int commandtype, const char *command, int execute_on, int port,
+zbx_tm_remote_command_t *zbx_tm_remote_command_create(int command_type, const char *command, int execute_on, int port,
int authtype, const char *username, const char *password, const char *publickey, const char *privatekey,
zbx_uint64_t parent_taskid, zbx_uint64_t hostid, zbx_uint64_t alertid);
zbx_tm_remote_command_result_t *zbx_tm_remote_command_result_create(zbx_uint64_t parent_taskid, int status,
- const char *error);
+ const char *info);
zbx_tm_check_now_t *zbx_tm_check_now_create(zbx_uint64_t itemid);