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:
authorAlexei Vladishev <alexei.vladishev@zabbix.com>2017-12-18 19:22:46 +0300
committerAlexei Vladishev <alexei.vladishev@zabbix.com>2017-12-18 19:22:46 +0300
commit0250dc51af81650fa42983aee623c632e98d4a78 (patch)
tree696417f4082cb8b9063ece8657620ecc86e7edbd /include
parent7443e021fbc6f11ff612dc85bd4feef0b9ebdd87 (diff)
...G...PS. [DEV-764] added ability to compile Zabbix as C++ code for stronger type safety and new class of warnings
Diffstat (limited to 'include')
-rw-r--r--include/db.h2
-rw-r--r--include/module.h18
-rw-r--r--include/proxy.h2
-rw-r--r--include/zbxserialize.h2
-rw-r--r--include/zbxtypes.h2
5 files changed, 13 insertions, 13 deletions
diff --git a/include/db.h b/include/db.h
index 2c2cf78fe96..00e8d4fcc3f 100644
--- a/include/db.h
+++ b/include/db.h
@@ -328,7 +328,7 @@ typedef struct
char *value2;
int condition_result;
unsigned char conditiontype;
- unsigned char operator;
+ unsigned char op;
}
DB_CONDITION;
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/proxy.h b/include/proxy.h
index 42e969e935b..5679cdc1eef 100644
--- a/include/proxy.h
+++ b/include/proxy.h
@@ -58,7 +58,7 @@ int process_history_data(DC_ITEM *items, zbx_agent_value_t *values, int *errcode
int process_discovery_data(struct zbx_json_parse *jp, zbx_timespec_t *ts, char **error);
int process_auto_registration(struct zbx_json_parse *jp, zbx_uint64_t proxy_hostid, zbx_timespec_t *ts, char **error);
-void lld_process_discovery_rule(zbx_uint64_t lld_ruleid, char *value, const zbx_timespec_t *ts);
+void lld_process_discovery_rule(zbx_uint64_t lld_ruleid, const char *value, const zbx_timespec_t *ts);
int proxy_get_history_count(void);
diff --git a/include/zbxserialize.h b/include/zbxserialize.h
index 6ca5ca0890d..5af9212d6dc 100644
--- a/include/zbxserialize.h
+++ b/include/zbxserialize.h
@@ -78,7 +78,7 @@
( \
memcpy(&value_len, buffer, sizeof(zbx_uint32_t)), \
0 < value_len ? ( \
- *value = zbx_malloc(NULL, value_len + 1), \
+ *value = (char *)zbx_malloc(NULL, value_len + 1), \
memcpy(*(value), buffer + sizeof(zbx_uint32_t), value_len), \
(*value)[value_len] = '\0' \
) : (*value = NULL, 0), \
diff --git a/include/zbxtypes.h b/include/zbxtypes.h
index f869119cc84..523a0b957c8 100644
--- a/include/zbxtypes.h
+++ b/include/zbxtypes.h
@@ -159,7 +159,7 @@ typedef off_t zbx_offset_t;
#define ZBX_STR2UCHAR(var, string) var = (unsigned char)atoi(string)
-#define ZBX_CONST_STRING(str) ""str
+#define ZBX_CONST_STRING(str) "" str
#define ZBX_CONST_STRLEN(str) (sizeof(ZBX_CONST_STRING(str)) - 1)
typedef struct