Found 402 issues src/zabbix_server/trapper/nodecommand.c:42: error: DEAD_STORE The value written to &ret (type int) is never used. 40. size_t max_error_len) 41. { 42. > int ret = FAIL, time_start; 43. zbx_uint64_t taskid; 44. DB_RESULT result = NULL; src/zabbix_agent/zbxconf.c:72: error: DEAD_STORE The value written to &c (type char*) is never used. 70. add_alias(*pline, c); 71. 72. > *--c = ':'; 73. } 74. } src/libs/zbxsysinfo/common/http.c:58: error: DEAD_STORE The value written to &p (type char*) is never used. 56. return SUCCEED; 57. 58. > if (NULL != (p = strchr(host, ':')) && NULL == strchr(++p, ':')) 59. ret = SUCCEED; 60. src/zabbix_server/alerter/alerter.c:54: error: DEAD_STORE The value written to &ret (type int) is never used. 52. { 53. char *output = NULL; 54. > int ret = FAIL; 55. 56. if (SUCCEED == (ret = zbx_execute(command, &output, error, max_error_len, ALARM_ACTION_TIMEOUT, src/zabbix_server/poller/checks_agent.c:128: error: UNINITIALIZED_VALUE The value read from received_len was never initialized. 126. ret = AGENT_ERROR; 127. } 128. > else if (0 == received_len) 129. { 130. SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Received empty response from Zabbix Agent at [%s]." src/libs/zbxavailability/avail_protocol.c:83: error: UNINITIALIZED_VALUE The value read from deserialize_error_len was never initialized. 81. data += zbx_deserialize_value(data, &interface_availability->agent.errors_from); 82. data += zbx_deserialize_value(data, &interface_availability->agent.disable_until); 83. > data += zbx_deserialize_str(data, &interface_availability->agent.error, deserialize_error_len); 84. } 85. } src/libs/zbxembed/console.c:86: error: NULL_DEREFERENCE pointer `msg_raw` last assigned on line 80 could be null and is dereferenced by call to `zbx_strdup2()` at line 86, column 17. 84. if (SUCCEED != zbx_cesu8_to_utf8(msg_raw, &msg_output)) 85. { 86. > msg_output = zbx_strdup(msg_output, msg_raw); 87. zbx_replace_invalid_utf8(msg_output); 88. } src/libs/zbxsysinfo/linux/diskio.c:108: error: UNINITIALIZED_VALUE The value read from dev_st.st_rdev was never initialized. 106. { 107. if (SUCCEED != dev_exists 108. > || major(dev_st.st_rdev) != rdev_major 109. || minor(dev_st.st_rdev) != rdev_minor) 110. continue; src/libs/zbxsysinfo/linux/diskio.c:109: error: UNINITIALIZED_VALUE The value read from dev_st.st_rdev was never initialized. 107. if (SUCCEED != dev_exists 108. || major(dev_st.st_rdev) != rdev_major 109. > || minor(dev_st.st_rdev) != rdev_minor) 110. continue; 111. } src/libs/zbxsysinfo/linux/diskio.c:116: error: UNINITIALIZED_VALUE The value read from ds[_] was never initialized. 114. } 115. 116. > dstat[ZBX_DSTAT_R_OPER] += ds[ZBX_DSTAT_R_OPER]; 117. dstat[ZBX_DSTAT_R_SECT] += ds[ZBX_DSTAT_R_SECT]; 118. dstat[ZBX_DSTAT_W_OPER] += ds[ZBX_DSTAT_W_OPER]; src/libs/zbxsysinfo/linux/diskio.c:117: error: UNINITIALIZED_VALUE The value read from ds[_] was never initialized. 115. 116. dstat[ZBX_DSTAT_R_OPER] += ds[ZBX_DSTAT_R_OPER]; 117. > dstat[ZBX_DSTAT_R_SECT] += ds[ZBX_DSTAT_R_SECT]; 118. dstat[ZBX_DSTAT_W_OPER] += ds[ZBX_DSTAT_W_OPER]; 119. dstat[ZBX_DSTAT_W_SECT] += ds[ZBX_DSTAT_W_SECT]; src/libs/zbxsysinfo/linux/diskio.c:118: error: UNINITIALIZED_VALUE The value read from ds[_] was never initialized. 116. dstat[ZBX_DSTAT_R_OPER] += ds[ZBX_DSTAT_R_OPER]; 117. dstat[ZBX_DSTAT_R_SECT] += ds[ZBX_DSTAT_R_SECT]; 118. > dstat[ZBX_DSTAT_W_OPER] += ds[ZBX_DSTAT_W_OPER]; 119. dstat[ZBX_DSTAT_W_SECT] += ds[ZBX_DSTAT_W_SECT]; 120. src/libs/zbxsysinfo/linux/diskio.c:119: error: UNINITIALIZED_VALUE The value read from ds[_] was never initialized. 117. dstat[ZBX_DSTAT_R_SECT] += ds[ZBX_DSTAT_R_SECT]; 118. dstat[ZBX_DSTAT_W_OPER] += ds[ZBX_DSTAT_W_OPER]; 119. > dstat[ZBX_DSTAT_W_SECT] += ds[ZBX_DSTAT_W_SECT]; 120. 121. ret = SUCCEED; src/libs/zbxcrypto/sha256crypt.c:131: error: UNINITIALIZED_VALUE The value read from W[_] was never initialized. 129. 130. for (t = 16; t < 64; ++t) 131. > W[t] = R1 (W[t - 2]) + W[t - 7] + R0 (W[t - 15]) + W[t - 16]; 132. 133. /* The actual computation according to FIPS 180-2:6.2.2 step 3. */ src/libs/zbxcrypto/sha256crypt.c:136: error: UNINITIALIZED_VALUE The value read from W[_] was never initialized. 134. for (t = 0; t < 64; ++t) 135. { 136. > uint32_t T1 = h + S1 (e) + Ch (e, f, g) + K[t] + W[t]; 137. uint32_t T2 = S0 (a) + Maj (a, b, c); 138. h = g; src/zabbix_server/lld/lld_protocol.c:82: error: UNINITIALIZED_VALUE The value read from error_len was never initialized. 80. data += zbx_deserialize_str(data, value, value_len); 81. data += zbx_deserialize_value(data, ts); 82. > data += zbx_deserialize_str(data, error, error_len); 83. data += zbx_deserialize_value(data, meta); 84. if (0 != *meta) src/zabbix_server/lld/lld_protocol.c:80: error: UNINITIALIZED_VALUE The value read from value_len was never initialized. 78. 79. data += zbx_deserialize_value(data, itemid); 80. > data += zbx_deserialize_str(data, value, value_len); 81. data += zbx_deserialize_value(data, ts); 82. data += zbx_deserialize_str(data, error, error_len); src/zabbix_server/trapper/proxydata.c:137: error: UNINITIALIZED_VALUE The value read from version was never initialized. 135. /* we are trying to save info about lastaccess to detect communication problem */ 136. { 137. > zbx_update_proxy_data(&proxy, version, ts->sec, 138. (0 != (sock->protocol & ZBX_TCP_COMPRESS) ? 1 : 0), 0); 139. } src/libs/zbxtrends/trends.c:94: error: DEAD_STORE The value written to &ret (type int) is never used. 92. { 93. char *period_shift; 94. > int ret = FAIL; 95. 96. if (NULL == (period_shift = zbx_function_get_param_dyn(params, 2))) src/zabbix_server/alerter/alerter_protocol.c:100: error: UNINITIALIZED_VALUE The value read from len was never initialized. 98. zbx_uint32_t len; 99. 100. > data += zbx_deserialize_str(data, value, len); 101. data += zbx_deserialize_value(data, errcode); 102. data += zbx_deserialize_str(data, error, len); src/libs/zbxcrypto/sha512crypt.c:157: error: UNINITIALIZED_VALUE The value read from W[_] was never initialized. 155. } 156. for (t = 16; t < 80; ++t) 157. > W[t] = R1 (W[t - 2]) + W[t - 7] + R0 (W[t - 15]) + W[t - 16]; 158. 159. /* The actual computation according to FIPS 180-2:6.3.2 step 3. */ src/libs/zbxcrypto/sha512crypt.c:162: error: UNINITIALIZED_VALUE The value read from W[_] was never initialized. 160. for (t = 0; t < 80; ++t) 161. { 162. > uint64_t T1 = h + S1 (e) + Ch (e, f, g) + K[t] + W[t]; 163. uint64_t T2 = S0 (a) + Maj (a, b, c); 164. h = g; src/zabbix_server/preprocessor/item_preproc.c:105: error: DEAD_STORE The value written to &ret (type int) is never used. 103. unsigned char value_type, char **errmsg) 104. { 105. > int ret = FAIL, type_hint; 106. 107. switch (value->type) src/zabbix_server/discoverer/discoverer.c:258: error: UNINITIALIZED_VALUE The value read from item.snmp_version was never initialized. 256. MACRO_TYPE_SNMP_OID, NULL, 0); 257. 258. > if (ZBX_IF_SNMP_VERSION_3 == item.snmp_version) 259. { 260. item.snmpv3_securityname = src/zabbix_server/httppoller/httptest.c:180: error: UNINITIALIZED_VALUE The value read from types[_] was never initialized. 178. switch (types[i]) 179. { 180. > case ZBX_HTTPITEM_TYPE_SPEED: 181. SET_UI64_RESULT(&value, speed_download); 182. break; src/zabbix_server/httppoller/httptest.c:183: error: UNINITIALIZED_VALUE The value read from types[_] was never initialized. 181. SET_UI64_RESULT(&value, speed_download); 182. break; 183. > case ZBX_HTTPITEM_TYPE_LASTSTEP: 184. SET_UI64_RESULT(&value, lastfailedstep); 185. break; src/zabbix_server/httppoller/httptest.c:186: error: UNINITIALIZED_VALUE The value read from types[_] was never initialized. 184. SET_UI64_RESULT(&value, lastfailedstep); 185. break; 186. > case ZBX_HTTPITEM_TYPE_LASTERROR: 187. SET_STR_RESULT(&value, zbx_strdup(NULL, err_str)); 188. break; src/libs/zbxdbcache/dbconfig.c:121: error: NULL_DEREFERENCE pointer `dst` last assigned on line 120 could be null and is dereferenced by call to `memcpy()` at line 121, column 2. 119. len = strlen(source) + 1; 120. dst = (char *)__config_mem_malloc_func(NULL, len); 121. > memcpy(dst, source, len); 122. return dst; 123. } src/zabbix_server/pinger/pinger.c:184: error: UNINITIALIZED_VALUE The value read from value_dbl was never initialized. 182. } 183. 184. > if (0 < value_dbl && ZBX_FLOAT_PRECISION > value_dbl) 185. value_dbl = ZBX_FLOAT_PRECISION; 186. src/zabbix_server/pinger/pinger.c:184: error: UNINITIALIZED_VALUE The value read from value_dbl was never initialized. 182. } 183. 184. > if (0 < value_dbl && ZBX_FLOAT_PRECISION > value_dbl) 185. value_dbl = ZBX_FLOAT_PRECISION; 186. src/zabbix_agent/cpustat.c:127: error: DEAD_STORE The value written to &ret (type int) is never used. 125. { 126. char *error = NULL; 127. > int idx, ret = FAIL; 128. #ifdef _WINDOWS 129. wchar_t cpu[16]; /* 16 is enough to store instance name string (group and index) */ src/libs/zbxsysinfo/common/dns.c:882: error: DEAD_STORE The value written to &offset (type unsigned long) is never used. 880. 881. if (0 != offset) 882. > buffer[--offset] = '\0'; 883. 884. SET_TEXT_RESULT(result, zbx_strdup(NULL, buffer)); src/libs/zbxsysinfo/common/dns.c:132: error: DEAD_STORE The value written to &ret (type int) is never used. 130. 131. size_t offset = 0; 132. > int res, type, retrans, retry, use_tcp, i, ret = SYSINFO_RET_FAIL, ip_type = AF_INET; 133. char *ip, zone[MAX_STRING_LEN], buffer[MAX_STRING_LEN], *zone_str, *param, 134. tmp[MAX_STRING_LEN]; src/libs/zbxsysinfo/common/dns.c:567: error: UNINITIALIZED_VALUE The value read from saved_ns6 was never initialized. 565. # ifdef HAVE_RES_U_EXT /* Linux */ 566. if (NULL != ip && '\0' != *ip && AF_INET6 == ip_type) 567. > res_state_local._u._ext.nsaddrs[0] = saved_ns6; 568. # endif 569. # ifdef HAVE_RES_NDESTROY src/libs/zbxsysinfo/common/dns.c:468: error: UNINITIALIZED_VALUE The value read from type was never initialized. 466. 467. #if defined(HAVE_RES_NINIT) && !defined(_AIX) 468. > if (-1 == (res = res_nmkquery(&res_state_local, QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf)))) 469. #else 470. if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf)))) src/zabbix_server/poller/checks_http.c:146: error: USE_AFTER_FREE pointer `line` last assigned on line 142 was freed by call to `free()` at line 154, column 3 and is dereferenced or freed at line 146, column 13. 144. if (0 == json_content && 145. 0 == zbx_strncasecmp(line, "Content-Type:", ZBX_CONST_STRLEN("Content-Type:")) && 146. > NULL != strstr(line, "application/json")) 147. { 148. json_content = 1; src/zabbix_server/poller/checks_http.c:154: error: USE_AFTER_FREE pointer `line` last assigned on line 142 was freed by call to `free()` at line 154, column 3 and is dereferenced or freed at line 154, column 3. 152. http_add_json_header(&json, line); 153. 154. > zbx_free(line); 155. } 156. src/zabbix_server/trapper/trapper_item_test.c:378: error: UNINITIALIZED_VALUE The value read from item.headers was never initialized. 376. zbx_free(item.status_codes); 377. zbx_free(item.http_proxy); 378. > zbx_free(item.headers); 379. zbx_free(item.ssl_cert_file); 380. zbx_free(item.ssl_key_file); src/zabbix_server/trapper/trapper_item_test.c:377: error: UNINITIALIZED_VALUE The value read from item.http_proxy was never initialized. 375. zbx_free(item.posts); 376. zbx_free(item.status_codes); 377. > zbx_free(item.http_proxy); 378. zbx_free(item.headers); 379. zbx_free(item.ssl_cert_file); src/zabbix_server/trapper/trapper_item_test.c:371: error: UNINITIALIZED_VALUE The value read from item.jmx_endpoint was never initialized. 369. zbx_free(item.privatekey); 370. zbx_free(item.password); 371. > zbx_free(item.jmx_endpoint); 372. zbx_free(item.timeout); 373. zbx_free(item.url); src/zabbix_server/trapper/trapper_item_test.c:366: error: UNINITIALIZED_VALUE The value read from item.params was never initialized. 364. zbx_free(item.key); 365. zbx_free(item.snmp_oid); 366. > zbx_free(item.params); 367. zbx_free(item.username); 368. zbx_free(item.publickey); src/zabbix_server/trapper/trapper_item_test.c:370: error: UNINITIALIZED_VALUE The value read from item.password was never initialized. 368. zbx_free(item.publickey); 369. zbx_free(item.privatekey); 370. > zbx_free(item.password); 371. zbx_free(item.jmx_endpoint); 372. zbx_free(item.timeout); src/zabbix_server/trapper/trapper_item_test.c:375: error: UNINITIALIZED_VALUE The value read from item.posts was never initialized. 373. zbx_free(item.url); 374. zbx_free(item.query_fields); 375. > zbx_free(item.posts); 376. zbx_free(item.status_codes); 377. zbx_free(item.http_proxy); src/zabbix_server/trapper/trapper_item_test.c:369: error: UNINITIALIZED_VALUE The value read from item.privatekey was never initialized. 367. zbx_free(item.username); 368. zbx_free(item.publickey); 369. > zbx_free(item.privatekey); 370. zbx_free(item.password); 371. zbx_free(item.jmx_endpoint); src/zabbix_server/trapper/trapper_item_test.c:368: error: UNINITIALIZED_VALUE The value read from item.publickey was never initialized. 366. zbx_free(item.params); 367. zbx_free(item.username); 368. > zbx_free(item.publickey); 369. zbx_free(item.privatekey); 370. zbx_free(item.password); src/zabbix_server/trapper/trapper_item_test.c:374: error: UNINITIALIZED_VALUE The value read from item.query_fields was never initialized. 372. zbx_free(item.timeout); 373. zbx_free(item.url); 374. > zbx_free(item.query_fields); 375. zbx_free(item.posts); 376. zbx_free(item.status_codes); src/zabbix_server/trapper/trapper_item_test.c:387: error: UNINITIALIZED_VALUE The value read from item.script_params was never initialized. 385. zbx_free(item.snmpv3_privpassphrase); 386. zbx_free(item.snmpv3_contextname); 387. > zbx_free(item.script_params); 388. 389. zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%s", __func__, zbx_result_string(ret)); src/zabbix_server/trapper/trapper_item_test.c:382: error: UNINITIALIZED_VALUE The value read from item.snmp_community was never initialized. 380. zbx_free(item.ssl_key_file); 381. zbx_free(item.ssl_key_password); 382. > zbx_free(item.snmp_community); 383. zbx_free(item.snmpv3_securityname); 384. zbx_free(item.snmpv3_authpassphrase); src/zabbix_server/trapper/trapper_item_test.c:365: error: UNINITIALIZED_VALUE The value read from item.snmp_oid was never initialized. 363. out: 364. zbx_free(item.key); 365. > zbx_free(item.snmp_oid); 366. zbx_free(item.params); 367. zbx_free(item.username); src/zabbix_server/trapper/trapper_item_test.c:384: error: UNINITIALIZED_VALUE The value read from item.snmpv3_authpassphrase was never initialized. 382. zbx_free(item.snmp_community); 383. zbx_free(item.snmpv3_securityname); 384. > zbx_free(item.snmpv3_authpassphrase); 385. zbx_free(item.snmpv3_privpassphrase); 386. zbx_free(item.snmpv3_contextname); src/zabbix_server/trapper/trapper_item_test.c:386: error: UNINITIALIZED_VALUE The value read from item.snmpv3_contextname was never initialized. 384. zbx_free(item.snmpv3_authpassphrase); 385. zbx_free(item.snmpv3_privpassphrase); 386. > zbx_free(item.snmpv3_contextname); 387. zbx_free(item.script_params); 388. src/zabbix_server/trapper/trapper_item_test.c:385: error: UNINITIALIZED_VALUE The value read from item.snmpv3_privpassphrase was never initialized. 383. zbx_free(item.snmpv3_securityname); 384. zbx_free(item.snmpv3_authpassphrase); 385. > zbx_free(item.snmpv3_privpassphrase); 386. zbx_free(item.snmpv3_contextname); 387. zbx_free(item.script_params); src/zabbix_server/trapper/trapper_item_test.c:383: error: UNINITIALIZED_VALUE The value read from item.snmpv3_securityname was never initialized. 381. zbx_free(item.ssl_key_password); 382. zbx_free(item.snmp_community); 383. > zbx_free(item.snmpv3_securityname); 384. zbx_free(item.snmpv3_authpassphrase); 385. zbx_free(item.snmpv3_privpassphrase); src/zabbix_server/trapper/trapper_item_test.c:379: error: UNINITIALIZED_VALUE The value read from item.ssl_cert_file was never initialized. 377. zbx_free(item.http_proxy); 378. zbx_free(item.headers); 379. > zbx_free(item.ssl_cert_file); 380. zbx_free(item.ssl_key_file); 381. zbx_free(item.ssl_key_password); src/zabbix_server/trapper/trapper_item_test.c:380: error: UNINITIALIZED_VALUE The value read from item.ssl_key_file was never initialized. 378. zbx_free(item.headers); 379. zbx_free(item.ssl_cert_file); 380. > zbx_free(item.ssl_key_file); 381. zbx_free(item.ssl_key_password); 382. zbx_free(item.snmp_community); src/zabbix_server/trapper/trapper_item_test.c:381: error: UNINITIALIZED_VALUE The value read from item.ssl_key_password was never initialized. 379. zbx_free(item.ssl_cert_file); 380. zbx_free(item.ssl_key_file); 381. > zbx_free(item.ssl_key_password); 382. zbx_free(item.snmp_community); 383. zbx_free(item.snmpv3_securityname); src/zabbix_server/trapper/trapper_item_test.c:376: error: UNINITIALIZED_VALUE The value read from item.status_codes was never initialized. 374. zbx_free(item.query_fields); 375. zbx_free(item.posts); 376. > zbx_free(item.status_codes); 377. zbx_free(item.http_proxy); 378. zbx_free(item.headers); src/zabbix_server/trapper/trapper_item_test.c:372: error: UNINITIALIZED_VALUE The value read from item.timeout was never initialized. 370. zbx_free(item.password); 371. zbx_free(item.jmx_endpoint); 372. > zbx_free(item.timeout); 373. zbx_free(item.url); 374. zbx_free(item.query_fields); src/zabbix_server/trapper/trapper_item_test.c:373: error: UNINITIALIZED_VALUE The value read from item.url was never initialized. 371. zbx_free(item.jmx_endpoint); 372. zbx_free(item.timeout); 373. > zbx_free(item.url); 374. zbx_free(item.query_fields); 375. zbx_free(item.posts); src/zabbix_server/trapper/trapper_item_test.c:367: error: UNINITIALIZED_VALUE The value read from item.username was never initialized. 365. zbx_free(item.snmp_oid); 366. zbx_free(item.params); 367. > zbx_free(item.username); 368. zbx_free(item.publickey); 369. zbx_free(item.privatekey); src/libs/zbxsysinfo/linux/diskspace.c:151: error: DEAD_STORE The value written to &p (type char*) is never used. 149. continue; 150. 151. > mpoint = ++p; 152. 153. if (NULL == (p = strchr(mpoint, ' '))) src/libs/zbxsysinfo/linux/diskspace.c:158: error: DEAD_STORE The value written to &p (type char*) is never used. 156. *p = '\0'; 157. 158. > mtype = ++p; 159. 160. if (NULL == (p = strchr(mtype, ' '))) src/libs/zbxdbhigh/proxy.c:220: error: UNINITIALIZED_VALUE The value read from attr.psk_identity_len was never initialized. 218. else if (ZBX_TCP_SEC_TLS_PSK == sock->connection_type) 219. { 220. > if (strlen(proxy->tls_psk_identity) != attr.psk_identity_len || 221. 0 != memcmp(proxy->tls_psk_identity, attr.psk_identity, attr.psk_identity_len)) 222. { src/libs/zbxdbhigh/proxy.c:221: error: UNINITIALIZED_VALUE The value read from attr.psk_identity_len was never initialized. 219. { 220. if (strlen(proxy->tls_psk_identity) != attr.psk_identity_len || 221. > 0 != memcmp(proxy->tls_psk_identity, attr.psk_identity, attr.psk_identity_len)) 222. { 223. *error = zbx_dsprintf(*error, "proxy \"%s\" is using false PSK identity", proxy->host); src/libs/zbxsysinfo/linux/memory.c:162: error: DEAD_STORE The value written to &ret (type int) is never used. 160. AGENT_RESULT result_tmp; 161. zbx_uint64_t available, total; 162. > int ret = SYSINFO_RET_FAIL; 163. 164. if (0 != sysinfo(&info)) src/zabbix_server/alerter/alerter_protocol.c:170: error: UNINITIALIZED_VALUE The value read from len was never initialized. 168. data += zbx_deserialize_value(data, mediatypeid); 169. data += zbx_deserialize_value(data, eventid); 170. > data += zbx_deserialize_str(data, sendto, len); 171. data += zbx_deserialize_str(data, subject, len); 172. data += zbx_deserialize_str(data, message, len); src/libs/zbxcommon/misc.c:172: error: DEAD_STORE The value written to &rc (type int) is never used. 170. #else 171. struct timeval tv; 172. > int rc = -1; 173. # ifdef HAVE_TIME_CLOCK_GETTIME 174. struct timespec tp; src/libs/zbxdbupgrade/dbupgrade_3030.c:213: error: DEAD_STORE The value written to &step (type int) is never used. 211. 212. if (NULL != formula) 213. > zbx_db_insert_add_values(db_insert, __UINT64_C(0), itemid, step++, ZBX_PREPROC_MULTIPLIER, formula); 214. 215. } src/libs/zbxsysinfo/linux/diskspace.c:210: error: DEAD_STORE The value written to &p (type char*) is never used. 208. continue; 209. 210. > mpoint = ++p; 211. 212. if (NULL == (p = strchr(mpoint, ' '))) src/libs/zbxsysinfo/linux/diskspace.c:217: error: DEAD_STORE The value written to &p (type char*) is never used. 215. *p = '\0'; 216. 217. > mtype = ++p; 218. 219. if (NULL == (p = strchr(mtype, ' '))) src/libs/zbxsysinfo/linux/diskspace.c:268: error: DEAD_STORE The value written to &p (type char*) is never used. 266. continue; 267. 268. > mpoint = ++p; 269. 270. if (NULL == (p = strchr(mpoint, ' '))) src/libs/zbxsysinfo/linux/software.c:275: error: DEAD_STORE The value written to &offset (type unsigned long) is never used. 273. } 274. else if (0 != offset) 275. > buffer[--offset] = '\0'; 276. 277. zbx_vector_str_destroy(&packages); src/zabbix_server/poller/checks_internal.c:442: error: DEAD_STORE The value written to &process_type (type unsigned char) is never used. 440. else if (0 == strcmp(tmp, "process")) /* zabbix["process",,,] */ 441. { 442. > unsigned char process_type = ZBX_PROCESS_TYPE_UNKNOWN; 443. int process_forks; 444. double value; src/libs/zbxprometheus/zbxprometheus.c:227: error: DEAD_STORE The value written to &pout (type char*) is never used. 225. } 226. 227. > *pout++ ='\0'; 228. 229. return str; src/zabbix_server/alerter/alerter_protocol.c:214: error: UNINITIALIZED_VALUE The value read from len was never initialized. 212. 213. data += zbx_deserialize_value(data, alertid); 214. > data += zbx_deserialize_str(data, sendto, len); 215. data += zbx_deserialize_str(data, message, len); 216. (void)zbx_deserialize_str(data, gsm_modem, len); src/libs/zbxmedia/sms.c:270: error: UNINITIALIZED_VALUE The value read from options.c_lflag was never initialized. 268. #endif 269. options.c_cflag = old_options.c_cflag | CRTSCTS | CS8 | CLOCAL | CREAD; 270. > options.c_lflag &= (tcflag_t)~(ICANON | ECHO | ECHOE | ISIG); 271. options.c_cc[VMIN] = 0; 272. options.c_cc[VTIME] = 1; src/libs/zbxnix/dshm.c:252: error: MEMORY_LEAK memory dynamically allocated by call to `zbx_shm_create()` at line 232, column 21 is not reachable after line 252, column 4. 250. if (-1 == shmdt((void *)addr)) 251. { 252. > *errmsg = zbx_strdup(*errmsg, "cannot detach from new shared memory"); 253. goto out; 254. } src/libs/zbxjson/jsonpath.c:226: error: DEAD_STORE The value written to &item (type zbx_jsonpath_list_item*) is never used. 224. static void jsonpath_list_free(zbx_jsonpath_list_node_t *list) 225. { 226. > zbx_jsonpath_list_node_t *item = list; 227. 228. while (NULL != list) src/libs/zbxself/selfmon.c:273: error: UNINITIALIZED_VALUE The value read from sz_process[_] was never initialized. 271. for (proc_type = 0; ZBX_PROCESS_TYPE_COUNT > proc_type; proc_type++) 272. { 273. > collector->process[proc_type] = (zbx_stat_process_t *)p; p += sz_process[proc_type]; 274. memset(collector->process[proc_type], 0, sz_process[proc_type]); 275. src/libs/zbxself/selfmon.c:274: error: UNINITIALIZED_VALUE The value read from sz_process[_] was never initialized. 272. { 273. collector->process[proc_type] = (zbx_stat_process_t *)p; p += sz_process[proc_type]; 274. > memset(collector->process[proc_type], 0, sz_process[proc_type]); 275. 276. process_forks = get_process_type_forks(proc_type); src/libs/zbxcrypto/base64.c:280: error: UNINITIALIZED_VALUE The value read from from[_] was never initialized. 278. /* decode a 4-character block */ 279. for (j = 0; j < 4; j++) 280. > to[j] = char_base64_decode(from[j]); 281. 282. if (1 <= lasti) /* from[0], from[1] available */ src/libs/zbxcrypto/base64.c:289: error: UNINITIALIZED_VALUE The value read from from[_] was never initialized. 287. } 288. 289. > if (2 <= lasti && '=' != from[2]) /* from[2] available */ 290. { 291. *p_str++ = (((to[1] & 0xf) << 4) | (to[2] >> 2)); src/libs/zbxcrypto/base64.c:296: error: UNINITIALIZED_VALUE The value read from from[_] was never initialized. 294. } 295. 296. > if (3 == lasti && '=' != from[3]) /* from[3] available */ 297. { 298. *p_str++ = (((to[2] & 0x3) << 6) | to[3]); src/libs/zbxcrypto/base64.c:284: error: UNINITIALIZED_VALUE The value read from to[_] was never initialized. 282. if (1 <= lasti) /* from[0], from[1] available */ 283. { 284. > *p_str++ = ((to[0] << 2) | (to[1] >> 4)); 285. if (++(*p_out_size) == maxsize) 286. break; src/libs/zbxcrypto/base64.c:291: error: UNINITIALIZED_VALUE The value read from to[_] was never initialized. 289. if (2 <= lasti && '=' != from[2]) /* from[2] available */ 290. { 291. > *p_str++ = (((to[1] & 0xf) << 4) | (to[2] >> 2)); 292. if (++(*p_out_size) == maxsize) 293. break; src/libs/zbxcrypto/base64.c:298: error: UNINITIALIZED_VALUE The value read from to[_] was never initialized. 296. if (3 == lasti && '=' != from[3]) /* from[3] available */ 297. { 298. > *p_str++ = (((to[2] & 0x3) << 6) | to[3]); 299. if (++(*p_out_size) == maxsize) 300. break; src/zabbix_server/alerter/alerter_protocol.c:241: error: UNINITIALIZED_VALUE The value read from len was never initialized. 239. 240. data += zbx_deserialize_value(data, alertid); 241. > (void)zbx_deserialize_str(data, command, len); 242. } 243. src/zabbix_server/poller/checks_aggregate.c:262: error: DEAD_STORE The value written to &sz_dst (type unsigned long) is never used. 260. (*str)[--sz_dst] = '\\'; 261. } 262. > (*str)[--sz_dst] = '"'; 263. } 264. src/zabbix_server/trapper/trapper_preproc.c:387: error: NULL_DEREFERENCE pointer `&history->values` last assigned on line 256 could be null and is dereferenced by call to `zbx_vector_ptr_clear_ext()` at line 387, column 2. 385. zbx_free(preproc_error); 386. 387. > zbx_vector_ptr_clear_ext(&history, (zbx_clean_func_t)zbx_preproc_op_history_free); 388. zbx_vector_ptr_destroy(&history); 389. zbx_vector_ptr_clear_ext(&results, (zbx_clean_func_t)zbx_preproc_result_free); src/zabbix_server/trapper/trapper_preproc.c:280: error: NULL_DEREFERENCE pointer `&results->values` last assigned on line 255 could be null and is dereferenced by call to `zbx_vector_ptr_clear_ext()` at line 280, column 3. 278. for (i = 0; i < values_num; i++) 279. { 280. > zbx_vector_ptr_clear_ext(&results, (zbx_clean_func_t)zbx_preproc_result_free); 281. 282. if (0 == steps.values_num) src/libs/zbxdbhigh/proxy.c:307: error: UNINITIALIZED_VALUE The value read from attr.psk_identity_len was never initialized. 305. else if (ZBX_TCP_SEC_TLS_PSK == sock->connection_type) 306. { 307. > if (strlen(host->tls_psk_identity) != attr.psk_identity_len || 308. 0 != memcmp(host->tls_psk_identity, attr.psk_identity, attr.psk_identity_len)) 309. { src/libs/zbxdbhigh/proxy.c:308: error: UNINITIALIZED_VALUE The value read from attr.psk_identity_len was never initialized. 306. { 307. if (strlen(host->tls_psk_identity) != attr.psk_identity_len || 308. > 0 != memcmp(host->tls_psk_identity, attr.psk_identity, attr.psk_identity_len)) 309. { 310. *error = zbx_dsprintf(*error, "host \"%s\" is using false PSK identity", host->host); src/libs/zbxsysinfo/linux/proc.c:280: error: UNINITIALIZED_VALUE The value read from guard_len was never initialized. 278. if (NULL != guard) 279. { 280. > if (0 == strncmp(buf, guard, guard_len)) 281. { 282. if (0 != fseek(f, pos, SEEK_SET)) src/libs/zbxconf/cfg.c:280: error: NULL_DEREFERENCE pointer `file` last assigned on line 278 could be null and is dereferenced by call to `stat()` at line 280, column 12. 278. file = zbx_dsprintf(file, "%s/%s", path, d->d_name); 279. 280. > if (0 != zbx_stat(file, &sb) || 0 == S_ISREG(sb.st_mode)) 281. continue; 282. src/zabbix_server/httppoller/httptest.c:323: error: UNINITIALIZED_VALUE The value read from types[_] was never initialized. 321. switch (types[i]) 322. { 323. > case ZBX_HTTPITEM_TYPE_RSPCODE: 324. SET_UI64_RESULT(&value, stat->rspcode); 325. break; src/zabbix_server/httppoller/httptest.c:326: error: UNINITIALIZED_VALUE The value read from types[_] was never initialized. 324. SET_UI64_RESULT(&value, stat->rspcode); 325. break; 326. > case ZBX_HTTPITEM_TYPE_TIME: 327. SET_DBL_RESULT(&value, stat->total_time); 328. break; src/zabbix_server/httppoller/httptest.c:329: error: UNINITIALIZED_VALUE The value read from types[_] was never initialized. 327. SET_DBL_RESULT(&value, stat->total_time); 328. break; 329. > case ZBX_HTTPITEM_TYPE_SPEED: 330. SET_DBL_RESULT(&value, stat->speed_download); 331. break; src/libs/zbxsysinfo/simple/simple.c:423: error: UNINITIALIZED_VALUE The value read from value_int was never initialized. 421. if (0 != perf) 422. { 423. > if (0 != value_int) 424. { 425. check_time = zbx_time() - check_time; src/libs/zbxsysinfo/simple/simple.c:436: error: UNINITIALIZED_VALUE The value read from value_int was never initialized. 434. } 435. else 436. > SET_UI64_RESULT(result, value_int); 437. } 438. src/libs/zbxsysinfo/linux/hardware.c:288: error: DEAD_STORE The value written to &ret (type int) is never used. 286. { 287. char *mode, buf[MAX_STRING_LEN]; 288. > int ret = SYSINFO_RET_FAIL; 289. 290. if (1 < request->nparam) src/zabbix_server/poller/poller.c:288: error: DEAD_STORE The value written to &res (type int) is never used. 286. static int get_value(DC_ITEM *item, AGENT_RESULT *result, zbx_vector_ptr_t *add_results) 287. { 288. > int res = FAIL; 289. 290. zabbix_log(LOG_LEVEL_DEBUG, "In %s() key:'%s'", __func__, item->key_orig); src/libs/zbxsysinfo/linux/net.c:341: error: UNINITIALIZED_VALUE The value read from end was never initialized. 339. ; 340. 341. > while (count < 3 && start < end) 342. { 343. while (' ' != *start) src/zabbix_server/alerter/alerter_protocol.c:322: error: UNINITIALIZED_VALUE The value read from len was never initialized. 320. data += zbx_deserialize_value(data, mediatypeid); 321. data += zbx_deserialize_value(data, type); 322. > data += zbx_deserialize_str(data, smtp_server, len); 323. data += zbx_deserialize_str(data, smtp_helo, len); 324. data += zbx_deserialize_str(data, smtp_email, len); src/zabbix_server/trapper/trapper.c:433: error: UNINITIALIZED_VALUE The value read from limit was never initialized. 431. zbx_json_addarray(&json, ZBX_PROTO_TAG_DATA); 432. 433. > for (i = 0; i < queue.values_num && i < limit; i++) 434. { 435. zbx_queue_item_t *item = (zbx_queue_item_t *)queue.values[i]; src/zabbix_server/preprocessor/preprocessing.c:347: error: UNINITIALIZED_VALUE The value read from value_len was never initialized. 345. 346. case ZBX_VARIANT_STR: 347. > offset += zbx_deserialize_str(offset, &value->data.str, value_len); 348. break; 349. src/zabbix_server/preprocessor/item_preproc.c:335: error: DEAD_STORE The value written to &ret (type int) is never used. 333. unsigned char op_type, zbx_variant_t *history_value, zbx_timespec_t *history_ts, char **errmsg) 334. { 335. > int ret = FAIL; 336. zbx_variant_t value_num; 337. src/libs/zbxmodules/modules.c:362: error: NULL_DEREFERENCE pointer `modules.values` last assigned on line 345 could be null and is dereferenced at line 362, column 47. 360. 361. /* if execution reached this point at least one module was loaded successfully */ 362. > buffer = zbx_strdcat(NULL, ((zbx_module_t *)modules.values[i++])->name); 363. 364. while (i < modules.values_num) src/libs/zbxtrends/cache.c:376: error: NULL_DEREFERENCE pointer `cache` last assigned on line 369 could be null and is dereferenced at line 376, column 2. 374. /* 5/4 - reversing critical load factor which is accounted for when inserting new hashset entry */ 375. /* but ignored when creating hashset with the specified size */ 376. > cache->slots_num = CONFIG_TREND_FUNC_CACHE_SIZE / (16 * 5 / 4 + sizeof(zbx_tfc_slot_t)); 377. 378. zabbix_log(LOG_LEVEL_DEBUG, "%s(): slots:%u", __func__, cache->slots_num); src/libs/zbxsysinfo/linux/proc.c:633: error: UNINITIALIZED_VALUE The value read from total_memory was never initialized. 631. if (SUCCEED == res) 632. { 633. > pct_value = ((double)byte_value / (double)total_memory) * 100.0; 634. } 635. else if (NOTSUPPORTED == res) src/zabbix_server/alerter/alerter_protocol.c:398: error: UNINITIALIZED_VALUE The value read from len was never initialized. 396. content_type, script, timeout); 397. 398. > data += zbx_deserialize_str(data, sendto, len); 399. data += zbx_deserialize_str(data, subject, len); 400. data += zbx_deserialize_str(data, message, len); src/libs/zbxdiag/diag.c:398: error: DEAD_STORE The value written to &ret (type int) is never used. 396. { 397. zbx_vector_ptr_t tops; 398. > int ret = FAIL; 399. double time1, time2, time_total = 0; 400. zbx_uint64_t fields; src/zabbix_server/pinger/pinger.c:435: error: UNINITIALIZED_VALUE The value read from count was never initialized. 433. if (SUCCEED == rc) 434. { 435. > add_icmpping_item(icmp_items, icmp_items_alloc, icmp_items_count, count, interval, size, 436. timeout, items[i].itemid, addr, icmpping, type); 437. } src/zabbix_server/pinger/pinger.c:435: error: UNINITIALIZED_VALUE The value read from icmpping was never initialized. 433. if (SUCCEED == rc) 434. { 435. > add_icmpping_item(icmp_items, icmp_items_alloc, icmp_items_count, count, interval, size, 436. timeout, items[i].itemid, addr, icmpping, type); 437. } src/zabbix_server/pinger/pinger.c:435: error: UNINITIALIZED_VALUE The value read from interval was never initialized. 433. if (SUCCEED == rc) 434. { 435. > add_icmpping_item(icmp_items, icmp_items_alloc, icmp_items_count, count, interval, size, 436. timeout, items[i].itemid, addr, icmpping, type); 437. } src/zabbix_server/pinger/pinger.c:435: error: UNINITIALIZED_VALUE The value read from size was never initialized. 433. if (SUCCEED == rc) 434. { 435. > add_icmpping_item(icmp_items, icmp_items_alloc, icmp_items_count, count, interval, size, 436. timeout, items[i].itemid, addr, icmpping, type); 437. } src/zabbix_server/pinger/pinger.c:435: error: UNINITIALIZED_VALUE The value read from timeout was never initialized. 433. if (SUCCEED == rc) 434. { 435. > add_icmpping_item(icmp_items, icmp_items_alloc, icmp_items_count, count, interval, size, 436. timeout, items[i].itemid, addr, icmpping, type); 437. } src/zabbix_server/pinger/pinger.c:435: error: UNINITIALIZED_VALUE The value read from type was never initialized. 433. if (SUCCEED == rc) 434. { 435. > add_icmpping_item(icmp_items, icmp_items_alloc, icmp_items_count, count, interval, size, 436. timeout, items[i].itemid, addr, icmpping, type); 437. } src/libs/zbxserver/expression.c:471: error: DEAD_STORE The value written to &index (type int) is never used. 469. if (0 != (flags & ZBX_PROBLEM_UPDATE_CLOSE)) 470. { 471. > zbx_strcpy_alloc(&buf, &buf_alloc, &buf_offset, prefixes[index++]); 472. zbx_strcpy_alloc(&buf, &buf_alloc, &buf_offset, "closed"); 473. } src/zabbix_server/preprocessor/preprocessing.c:417: error: UNINITIALIZED_VALUE The value read from value_len was never initialized. 415. 416. offset += zbx_deserialize_char(offset, &step->type); 417. > offset += zbx_deserialize_str_ptr(offset, step->params, value_len); 418. offset += zbx_deserialize_char(offset, &step->error_handler); 419. offset += zbx_deserialize_str_ptr(offset, step->error_handler_params, value_len); src/libs/zbxdbcache/dbconfig_maintenance.c:449: error: UNINITIALIZED_VALUE The value read from last_maintenanceid was never initialized. 447. ZBX_STR2UINT64(maintenanceid, row[0]); 448. 449. > if (NULL == maintenance || last_maintenanceid != maintenanceid) 450. { 451. if (NULL == (maintenance = (zbx_dc_maintenance_t *)zbx_hashset_search(&config->maintenances, src/zabbix_server/alerter/alerter_protocol.c:433: error: UNINITIALIZED_VALUE The value read from len was never initialized. 431. zbx_uint32_t len; 432. 433. > data += zbx_deserialize_str(data, script_bin, len); 434. data += zbx_deserialize_value(data, script_sz); 435. data += zbx_deserialize_value(data, timeout); src/libs/zbxsysinfo/common/http.c:445: error: NULL_DEREFERENCE pointer `path_str` last assigned on line 442 could be null and is dereferenced by call to `get_http_page()` at line 445, column 31. 443. port_str = get_rparam(request, 2); 444. 445. > if (SYSINFO_RET_OK == (ret = get_http_page(hostname, path_str, port_str, &buffer, &error))) 446. { 447. zbx_rtrim(buffer, "\r\n"); src/libs/zbxcommon/variant.c:469: error: UNINITIALIZED_VALUE The value read from value1_dbl was never initialized. 467. } 468. 469. > if (SUCCEED == zbx_double_compare(value1_dbl, value2_dbl)) 470. return 0; 471. src/libs/zbxcommon/variant.c:472: error: UNINITIALIZED_VALUE The value read from value1_dbl was never initialized. 470. return 0; 471. 472. > ZBX_RETURN_IF_NOT_EQUAL(value1_dbl, value2_dbl); 473. 474. THIS_SHOULD_NEVER_HAPPEN; src/libs/zbxcommon/variant.c:469: error: UNINITIALIZED_VALUE The value read from value2_dbl was never initialized. 467. } 468. 469. > if (SUCCEED == zbx_double_compare(value1_dbl, value2_dbl)) 470. return 0; 471. src/libs/zbxcommon/variant.c:472: error: UNINITIALIZED_VALUE The value read from value2_dbl was never initialized. 470. return 0; 471. 472. > ZBX_RETURN_IF_NOT_EQUAL(value1_dbl, value2_dbl); 473. 474. THIS_SHOULD_NEVER_HAPPEN; src/zabbix_server/poller/poller.c:492: error: MEMORY_LEAK memory dynamically allocated by call to `zbx_strdup2()` at line 491, column 6 is not reachable after line 492, column 6. 490. { 491. ZBX_STRDUP(items[i].snmpv3_securityname, items[i].snmpv3_securityname_orig); 492. > ZBX_STRDUP(items[i].snmpv3_authpassphrase, items[i].snmpv3_authpassphrase_orig); 493. ZBX_STRDUP(items[i].snmpv3_privpassphrase, items[i].snmpv3_privpassphrase_orig); 494. ZBX_STRDUP(items[i].snmpv3_contextname, items[i].snmpv3_contextname_orig); src/zabbix_server/poller/poller.c:493: error: MEMORY_LEAK memory dynamically allocated by call to `zbx_strdup2()` at line 492, column 6 is not reachable after line 493, column 6. 491. ZBX_STRDUP(items[i].snmpv3_securityname, items[i].snmpv3_securityname_orig); 492. ZBX_STRDUP(items[i].snmpv3_authpassphrase, items[i].snmpv3_authpassphrase_orig); 493. > ZBX_STRDUP(items[i].snmpv3_privpassphrase, items[i].snmpv3_privpassphrase_orig); 494. ZBX_STRDUP(items[i].snmpv3_contextname, items[i].snmpv3_contextname_orig); 495. src/zabbix_server/poller/poller.c:494: error: MEMORY_LEAK memory dynamically allocated by call to `zbx_strdup2()` at line 493, column 6 is not reachable after line 494, column 6. 492. ZBX_STRDUP(items[i].snmpv3_authpassphrase, items[i].snmpv3_authpassphrase_orig); 493. ZBX_STRDUP(items[i].snmpv3_privpassphrase, items[i].snmpv3_privpassphrase_orig); 494. > ZBX_STRDUP(items[i].snmpv3_contextname, items[i].snmpv3_contextname_orig); 495. 496. substitute_simple_macros_unmasked(NULL, NULL, NULL, NULL, &items[i].host.hostid, src/zabbix_server/poller/poller.c:515: error: MEMORY_LEAK memory dynamically allocated by call to `zbx_strdup2()` at line 514, column 5 is not reachable after line 515, column 5. 513. 514. ZBX_STRDUP(items[i].snmp_community, items[i].snmp_community_orig); 515. > ZBX_STRDUP(items[i].snmp_oid, items[i].snmp_oid_orig); 516. 517. substitute_simple_macros_unmasked(NULL, NULL, NULL, NULL, &items[i].host.hostid, NULL, src/zabbix_server/poller/poller.c:547: error: MEMORY_LEAK memory dynamically allocated by call to `zbx_strdup2()` at line 546, column 5 is not reachable after line 547, column 5. 545. 546. ZBX_STRDUP(items[i].publickey, items[i].publickey_orig); 547. > ZBX_STRDUP(items[i].privatekey, items[i].privatekey_orig); 548. 549. substitute_simple_macros(NULL, NULL, NULL, NULL, &items[i].host.hostid, NULL, NULL, src/zabbix_server/poller/poller.c:569: error: MEMORY_LEAK memory dynamically allocated by call to `zbx_strdup2()` at line 568, column 25 is not reachable after line 569, column 25. 567. 568. items[i].username = zbx_strdup(items[i].username, items[i].username_orig); 569. > items[i].password = zbx_strdup(items[i].password, items[i].password_orig); 570. 571. substitute_simple_macros_unmasked(NULL, NULL, NULL, NULL, &items[i].host.hostid, NULL, src/libs/zbxdbcache/valuecache.c:457: error: DEAD_STORE The value written to &ret (type int) is never used. 455. int count, const zbx_timespec_t *ts) 456. { 457. > int ret = FAIL, i, j, range_start; 458. 459. if (0 == count) src/libs/zbxsysinfo/common/http.c:474: error: NULL_DEREFERENCE pointer `path_str` last assigned on line 469 could be null and is dereferenced by call to `get_http_page()` at line 474, column 31. 472. start_time = zbx_time(); 473. 474. > if (SYSINFO_RET_OK == (ret = get_http_page(hostname, path_str, port_str, NULL, &error))) 475. SET_DBL_RESULT(result, zbx_time() - start_time); 476. else src/zabbix_server/proxypoller/proxypoller.c:529: error: UNINITIALIZED_VALUE The value read from proxy_old.auto_compress was never initialized. 527. } 528. error: 529. > if (proxy_old.version != proxy.version || proxy_old.auto_compress != proxy.auto_compress || 530. proxy_old.lastaccess != proxy.lastaccess) 531. { src/zabbix_server/proxypoller/proxypoller.c:530: error: UNINITIALIZED_VALUE The value read from proxy_old.lastaccess was never initialized. 528. error: 529. if (proxy_old.version != proxy.version || proxy_old.auto_compress != proxy.auto_compress || 530. > proxy_old.lastaccess != proxy.lastaccess) 531. { 532. zbx_update_proxy_data(&proxy_old, proxy.version, proxy.lastaccess, proxy.auto_compress, 0); src/zabbix_server/proxypoller/proxypoller.c:529: error: UNINITIALIZED_VALUE The value read from proxy_old.version was never initialized. 527. } 528. error: 529. > if (proxy_old.version != proxy.version || proxy_old.auto_compress != proxy.auto_compress || 530. proxy_old.lastaccess != proxy.lastaccess) 531. { src/libs/zbxdbhigh/discovery.c:497: error: UNINITIALIZED_VALUE The value read from dservice.dserviceid was never initialized. 495. 496. /* service was not registered because we do not add down service */ 497. > if (0 != dservice.dserviceid) 498. discovery_update_service_status(dhost, &dservice, status, value, now); 499. src/libs/zbxdbhigh/discovery.c:500: error: UNINITIALIZED_VALUE The value read from dservice.value was never initialized. 498. discovery_update_service_status(dhost, &dservice, status, value, now); 499. 500. > zbx_free(dservice.value); 501. 502. zabbix_log(LOG_LEVEL_DEBUG, "End of %s()", __func__); src/zabbix_sender/zabbix_sender.c:523: error: DEAD_STORE The value written to &p (type char const *) is never used. 521. 522. buf[buf_i] = '\0'; 523. > return ++p; 524. } 525. else if ('\\' == *p && ('"' == p[1] || '\\' == p[1])) src/zabbix_server/httppoller/httptest.c:520: error: USE_AFTER_FREE pointer `line` last assigned on line 518 was freed by call to `free()` at line 525, column 3 and is dereferenced or freed at line 520, column 12. 518. while (NULL != (line = zbx_http_parse_header(&headers))) 519. { 520. > if (0 == strncmp(COOKIE_HEADER_STR, line, COOKIE_HEADER_STR_LEN)) 521. *header_cookie = zbx_strdup(*header_cookie, line + COOKIE_HEADER_STR_LEN); 522. else src/libs/zbxdbhigh/itservices.c:592: error: NULL_DEREFERENCE pointer `&updates->values` last assigned on line 525 could be null and is dereferenced by call to `zbx_vector_ptr_clear_ext()` at line 592, column 2. 590. zbx_free(sql); 591. 592. > zbx_vector_ptr_clear_ext(&updates, (zbx_clean_func_t)zbx_status_update_free); 593. zbx_vector_ptr_destroy(&updates); 594. src/libs/zbxsysinfo/common/file.c:613: error: UNINITIALIZED_VALUE The value read from nbytes was never initialized. 611. } 612. 613. > if (-1 == nbytes) /* error occurred */ 614. { 615. SET_MSG_RESULT(result, zbx_strdup(NULL, "Cannot read from file.")); src/zabbix_server/alerter/alerter_protocol.c:561: error: UNINITIALIZED_VALUE The value read from len was never initialized. 559. data += zbx_deserialize_value(data, &alert->object); 560. data += zbx_deserialize_value(data, &alert->objectid); 561. > data += zbx_deserialize_str(data, &alert->sendto, len); 562. data += zbx_deserialize_str(data, &alert->subject, len); 563. data += zbx_deserialize_str(data, &alert->message, len); src/libs/zbxserver/evalfunc.c:762: error: UNINITIALIZED_VALUE The value read from arg2_2_ui64 was never initialized. 760. for (i = 0; i < values.values_num; i++) 761. { 762. > count_one_ui64(&count, op, values.values[i].value.ui64, arg2_ui64, 763. arg2_2_ui64); 764. } src/libs/zbxserver/evalfunc.c:780: error: UNINITIALIZED_VALUE The value read from arg2_dbl was never initialized. 778. { 779. for (i = 0; i < values.values_num; i++) 780. > count_one_dbl(&count, op, values.values[i].value.dbl, arg2_dbl); 781. } 782. else src/libs/zbxserver/evalfunc.c:762: error: UNINITIALIZED_VALUE The value read from arg2_ui64 was never initialized. 760. for (i = 0; i < values.values_num; i++) 761. { 762. > count_one_ui64(&count, op, values.values[i].value.ui64, arg2_ui64, 763. arg2_2_ui64); 764. } src/libs/zbxtasks/task.c:590: error: UNINITIALIZED_VALUE The value read from taskid was never initialized. 588. 589. if (0 == tasks[i]->taskid) 590. > tasks[i]->taskid = taskid++; 591. } 592. src/libs/zbxcommon/str.c:616: error: DEAD_STORE The value written to &out_alloc (type unsigned long) is never used. 614. } 615. 616. > out = zbx_malloc(NULL, ++out_alloc); 617. 618. for (pin = text, pout = out; '\0' != *pin; pin++) src/libs/zbxmedia/email.c:740: error: UNINITIALIZED_VALUE The value read from payload_status.payload was never initialized. 738. zbx_strlcpy(error, curl_easy_strerror(err), max_error_len); 739. clean: 740. > zbx_free(payload_status.payload); 741. 742. curl_slist_free_all(recipients); src/zabbix_server/alerter/alerter_protocol.c:621: error: UNINITIALIZED_VALUE The value read from len was never initialized. 619. data += zbx_deserialize_value(data, &media->mediaid); 620. data += zbx_deserialize_value(data, &media->mediatypeid); 621. > data += zbx_deserialize_str(data, &media->sendto, len); 622. 623. (*medias)[i] = media; src/libs/zbxdbhigh/itservices.c:620: error: DEAD_STORE The value written to &ret (type int) is never used. 618. static int its_flush_updates(const zbx_vector_ptr_t *updates) 619. { 620. > int i, j, k, ret = FAIL; 621. const zbx_status_update_t *update; 622. zbx_itservices_t itservices; src/zabbix_server/httppoller/httptest.c:904: error: UNINITIALIZED_VALUE The value read from stat.rspcode was never initialized. 902. } 903. else if ('\0' != *db_httpstep.status_codes && 904. > FAIL == int_in_list(db_httpstep.status_codes, stat.rspcode)) 905. { 906. err_str = zbx_dsprintf(err_str, "response code \"%ld\" did not match any of the" src/zabbix_server/httppoller/httptest.c:906: error: UNINITIALIZED_VALUE The value read from stat.rspcode was never initialized. 904. FAIL == int_in_list(db_httpstep.status_codes, stat.rspcode)) 905. { 906. > err_str = zbx_dsprintf(err_str, "response code \"%ld\" did not match any of the" 907. " required status codes \"%s\"", stat.rspcode, 908. db_httpstep.status_codes); src/zabbix_server/httppoller/httptest.c:924: error: UNINITIALIZED_VALUE The value read from stat.speed_download was never initialized. 922. else 923. { 924. > speed_download += stat.speed_download; 925. speed_download_num++; 926. } src/zabbix_server/preprocessor/preproc_manager.c:713: error: UNINITIALIZED_VALUE The value read from notsupp_shift was never initialized. 711. } 712. 713. > if (REQUEST_STATE_QUEUED == state && 0 <= notsupp_shift) 714. { 715. request->value_type = item->value_type; src/zabbix_server/preprocessor/preproc_manager.c:718: error: UNINITIALIZED_VALUE The value read from notsupp_shift was never initialized. 716. request->steps = (zbx_preproc_op_t *)zbx_malloc(NULL, sizeof(zbx_preproc_op_t) * 717. (item->preproc_ops_num - notsupp_shift)); 718. > request->steps_num = item->preproc_ops_num - notsupp_shift; 719. 720. for (i = 0; i < item->preproc_ops_num - notsupp_shift; i++) src/zabbix_server/preprocessor/preproc_manager.c:720: error: UNINITIALIZED_VALUE The value read from notsupp_shift was never initialized. 718. request->steps_num = item->preproc_ops_num - notsupp_shift; 719. 720. > for (i = 0; i < item->preproc_ops_num - notsupp_shift; i++) 721. { 722. request->steps[i].type = item->preproc_ops[i + notsupp_shift].type; src/zabbix_server/poller/checks_simple_vmware.c:682: error: USE_AFTER_FREE pointer `add_result` last assigned on line 681 was freed by call to `free()` at line 697, column 4 and is dereferenced or freed at line 682, column 3. 680. 681. add_result = (AGENT_RESULT *)zbx_malloc(add_result, sizeof(AGENT_RESULT)); 682. > init_result(add_result); 683. 684. if (SUCCEED == set_result_type(add_result, item->value_type, event->message)) src/zabbix_server/alerter/alerter_protocol.c:690: error: UNINITIALIZED_VALUE The value read from len was never initialized. 688. data += zbx_deserialize_value(data, &result->status); 689. data += zbx_deserialize_value(data, &result->retries); 690. > data += zbx_deserialize_str(data, &result->value, len); 691. data += zbx_deserialize_str(data, &result->error, len); 692. src/libs/zbxdbupgrade/dbupgrade_5010.c:704: error: NULL_DEREFERENCE pointer `v` last assigned on line 702 could be null and is dereferenced by call to `zbx_vector_char_create()` at line 704, column 2. 702. v = (zbx_vector_char_t *)malloc(sizeof(zbx_vector_char_t)); 703. 704. > zbx_vector_char_create(v); 705. zbx_vector_char_append_array(v, fill, SCREEN_MAX_ROWS); 706. src/libs/zbxjson/jsonpath.c:870: error: NULL_DEREFERENCE pointer `&operators->values` last assigned on line 718 could be null and is dereferenced by call to `zbx_vector_ptr_clear_ext()` at line 870, column 3. 868. if (SUCCEED != ret) 869. { 870. > zbx_vector_ptr_clear_ext(&operators, (zbx_clean_func_t)jsonpath_token_free); 871. zbx_vector_ptr_clear_ext(&output, (zbx_clean_func_t)jsonpath_token_free); 872. } src/zabbix_server/lld/lld_host.c:835: error: UNINITIALIZED_VALUE The value read from host was never initialized. 833. zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%p", __func__, (void *)host); 834. 835. > return host; 836. } 837. src/zabbix_sender/zabbix_sender.c:728: error: USE_AFTER_FREE pointer `thread_args` last assigned on line 726 was freed by call to `free()` at line 746, column 3 and is dereferenced or freed at line 728, column 3. 726. thread_args = (zbx_thread_args_t *)zbx_malloc(NULL, sizeof(zbx_thread_args_t)); 727. 728. > thread_args->args = &sendval_args[i]; 729. 730. sendval_args[i].server = destinations[i].host; src/zabbix_server/preprocessor/preprocessing.c:729: error: UNINITIALIZED_VALUE The value read from value_len was never initialized. 727. offset += zbx_deserialize_char(offset, &value->item_flags); 728. offset += zbx_deserialize_char(offset, &value->state); 729. > offset += zbx_deserialize_str(offset, &value->error, value_len); 730. offset += zbx_deserialize_char(offset, &ts_marker); 731. src/libs/zbxcommon/str.c:751: error: USE_AFTER_FREE pointer `string` last assigned on line 736 was freed by call to `free()` at line 751, column 3 and is dereferenced or freed at line 751, column 3. 749. size = n + 1; /* n bytes + trailing '\0' */ 750. 751. > zbx_free(string); 752. } 753. src/libs/zbxdbhigh/db.c:758: error: NULL_DEREFERENCE pointer `table` last assigned on line 746 could be null and is dereferenced at line 758, column 5. 756. 757. result = DBselect("select nextid from ids where table_name='%s' and field_name='%s'", 758. > table->table, table->recid); 759. 760. if (NULL == (row = DBfetch(result))) src/libs/zbxdbhigh/db.c:833: error: UNINITIALIZED_VALUE The value read from ret2 was never initialized. 831. __func__, ret2 - num + 1, table->table, table->recid); 832. 833. > return ret2 - num + 1; 834. } 835. src/libs/zbxcomms/comms.c:789: error: UNINITIALIZED_VALUE The value read from err was never initialized. 787. 788. if (ZBX_PROTO_ERROR == res) 789. > zbx_set_socket_strerror("ZBX_TCP_WRITE() failed: %s", strerror_from_system(err)); 790. 791. return res; src/libs/zbxdbhigh/itservices.c:805: error: NULL_DEREFERENCE pointer `&updates->values` last assigned on line 785 could be null and is dereferenced by call to `zbx_vector_ptr_clear_ext()` at line 805, column 2. 803. UNLOCK_ITSERVICES; 804. 805. > zbx_vector_ptr_clear_ext(&updates, (zbx_clean_func_t)zbx_status_update_free); 806. zbx_vector_ptr_destroy(&updates); 807. src/libs/zbxcommon/misc.c:821: error: NULL_DEREFERENCE pointer `tm` last assigned on line 820 could be null and is dereferenced at line 821, column 13. 819. 820. tm = localtime(&now); 821. > day = 0 == tm->tm_wday ? 7 : tm->tm_wday; 822. time = SEC_PER_HOUR * tm->tm_hour + SEC_PER_MIN * tm->tm_min + tm->tm_sec; 823. src/libs/zbxdbupgrade/dbupgrade_5010.c:837: error: NULL_DEREFERENCE pointer `block` last assigned on line 836 could be null and is dereferenced at line 837, column 3. 835. { 836. block = (sciitem_block_t *)malloc(sizeof(sciitem_block_t)); 837. > block->r_block = lw_array_create_fill(scitems->values[i].position, scitems->values[i].span); 838. block->index = i; 839. zbx_vector_ptr_append(&blocks, (void *)block); src/zabbix_server/preprocessor/preprocessing.c:842: error: UNINITIALIZED_VALUE The value read from value_len was never initialized. 840. offset += preprocesser_unpack_history(offset, history); 841. 842. > (void)zbx_deserialize_str(offset, error, value_len); 843. } 844. src/libs/zbxregexp/zbxregexp.c:850: error: DEAD_STORE The value written to &c (type char*) is never used. 848. { 849. *c = delimiter; 850. > s = ++c; 851. } 852. else src/libs/zbxdbupgrade/dbupgrade.c:858: error: DEAD_STORE The value written to &dbversion (type zbx_db_version_t*) is never used. 856. ; 857. 858. > patches = (--dbversion)->patches; 859. 860. for (i = 0; 0 != patches[i].version; i++) src/zabbix_server/preprocessor/preprocessing.c:873: error: UNINITIALIZED_VALUE The value read from value_len was never initialized. 871. result = (zbx_preproc_result_t *)zbx_malloc(NULL, sizeof(zbx_preproc_result_t)); 872. offset += preprocesser_unpack_variant(offset, &result->value); 873. > offset += zbx_deserialize_str(offset, &result->error, value_len); 874. offset += zbx_deserialize_char(offset, &result->action); 875. zbx_vector_ptr_append(results, result); src/zabbix_server/preprocessor/preprocessing.c:880: error: UNINITIALIZED_VALUE The value read from value_len was never initialized. 878. offset += preprocesser_unpack_history(offset, history); 879. 880. > (void)zbx_deserialize_str(offset, error, value_len); 881. } 882. src/libs/zbxjson/json.c:897: error: DEAD_STORE The value written to &p (type char const *) is never used. 895. case '"': 896. *out = '\0'; 897. > return ++p; 898. default: 899. *out++ = *p++; src/zabbix_server/preprocessor/item_preproc.c:884: error: NULL_DEREFERENCE pointer `value->data.str` last assigned on line 881 could be null and is dereferenced by call to `zbx_json_open()` at line 884, column 14. 882. return FAIL; 883. 884. > if (FAIL == zbx_json_open(value->data.str, &jp) || FAIL == zbx_jsonpath_query(&jp, params, &data)) 885. { 886. *errmsg = zbx_strdup(*errmsg, zbx_json_strerror()); src/libs/zbxdbupgrade/dbupgrade_5010.c:923: error: UNINITIALIZED_VALUE The value read from potential_value was never initialized. 921. 922. if (0 > potential_index || 923. > (dimensions_sum > target && value > potential_value) || 924. (dimensions_sum < target && value < potential_value)) 925. { src/libs/zbxdbupgrade/dbupgrade_5010.c:924: error: UNINITIALIZED_VALUE The value read from potential_value was never initialized. 922. if (0 > potential_index || 923. (dimensions_sum > target && value > potential_value) || 924. > (dimensions_sum < target && value < potential_value)) 925. { 926. potential_index = i; src/libs/zbxdbupgrade/dbupgrade_5010.c:931: error: UNINITIALIZED_VALUE The value read from potential_value was never initialized. 929. } 930. 931. > zabbix_log(LOG_LEVEL_TRACE, "dim_sum:%d pot_idx/val:%d/%.2lf", dimensions_sum, 932. potential_index, potential_value); 933. src/libs/zbxjson/jsonpath.c:904: error: DEAD_STORE The value written to &ret (type int) is never used. 902. { 903. zbx_jsonpath_segment_t *segment; 904. > int ret = FAIL, parsed_name = 0; 905. const char *end, *start = NULL; 906. zbx_jsonpath_list_node_t *head = NULL; src/libs/zbxdbupgrade/dbupgrade_3010.c:976: error: UNINITIALIZED_VALUE The value read from op_token.l was never initialized. 974. (ZBX_3010026_TOKEN_CLOSE == token_type || ZBX_3010026_TOKEN_END == token_type))) 975. { 976. > cut_loc.l = op_token.l; 977. cut_loc.r = value_token.r; 978. DBpatch_3010026_expression_move_location(&token, -(cut_loc.r - cut_loc.l + 1)); src/libs/zbxdbupgrade/dbupgrade_3010.c:984: error: UNINITIALIZED_VALUE The value read from value_token.l was never initialized. 982. else 983. { 984. > cut_loc.l = value_token.l; 985. 986. if (ZBX_3010026_TOKEN_CLOSE == token_type || ZBX_3010026_TOKEN_END == token_type) src/libs/zbxdbupgrade/dbupgrade_3010.c:977: error: UNINITIALIZED_VALUE The value read from value_token.r was never initialized. 975. { 976. cut_loc.l = op_token.l; 977. > cut_loc.r = value_token.r; 978. DBpatch_3010026_expression_move_location(&token, -(cut_loc.r - cut_loc.l + 1)); 979. prevop_type = token_type; src/zabbix_server/preprocessor/preproc_manager.c:921: error: DEAD_STORE The value written to &ret (type int) is never used. 919. zbx_variant_t *value, char *error) 920. { 921. > int type, ret = FAIL; 922. zbx_log_t *log; 923. src/libs/zbxdbcache/dbconfig.c:974: error: UNINITIALIZED_VALUE The value read from row[_] was never initialized. 972. /* store the config data */ 973. 974. > if (NULL != row[0]) 975. ZBX_STR2UINT64(config->config->discovery_groupid, row[0]); 976. else src/zabbix_agent/active.c:998: error: UNINITIALIZED_VALUE The value read from i was never initialized. 996. } 997. 998. > if (0 != (ZBX_METRIC_FLAG_PERSISTENT & flags) || i == buffer.count) 999. { 1000. for (i = 0; i < buffer.count; i++) src/zabbix_agent/active.c:1010: error: UNINITIALIZED_VALUE The value read from i was never initialized. 1008. if (NULL != el) 1009. { 1010. > zabbix_log(LOG_LEVEL_DEBUG, "remove element [%d] Key:'%s:%s'", i, el->host, el->key); 1011. 1012. zbx_free(el->host); src/zabbix_agent/active.c:1018: error: UNINITIALIZED_VALUE The value read from i was never initialized. 1016. } 1017. 1018. > sz = (CONFIG_BUFFER_SIZE - i - 1) * sizeof(ZBX_ACTIVE_BUFFER_ELEMENT); 1019. memmove(&buffer.data[i], &buffer.data[i + 1], sz); 1020. src/libs/zbxalgo/prediction.c:1128: error: UNINITIALIZED_VALUE The value read from result was never initialized. 1126. result = ZBX_MATH_ERROR; 1127. } 1128. > else if (ZBX_IS_NAN(result)) 1129. { 1130. zabbix_log(LOG_LEVEL_DEBUG, "numerical error"); src/libs/zbxalgo/prediction.c:1133: error: UNINITIALIZED_VALUE The value read from result was never initialized. 1131. result = ZBX_MATH_ERROR; 1132. } 1133. > else if (DB_INFINITY < result) 1134. { 1135. result = DB_INFINITY; src/libs/zbxalgo/prediction.c:1137: error: UNINITIALIZED_VALUE The value read from result was never initialized. 1135. result = DB_INFINITY; 1136. } 1137. > else if (-DB_INFINITY > result) 1138. { 1139. result = -DB_INFINITY; src/libs/zbxalgo/prediction.c:1142: error: UNINITIALIZED_VALUE The value read from result was never initialized. 1140. } 1141. 1142. > return result; 1143. } 1144. src/libs/zbxjson/jsonpath.c:1014: error: DEAD_STORE The value written to &ret (type int) is never used. 1012. zbx_jsonpath_segment_t *segment; 1013. const char *end, *start = NULL; 1014. > int ret = FAIL, type = ZBX_JSONPATH_SEGMENT_UNKNOWN; 1015. unsigned int flags = 0, parsed_index = 0; 1016. zbx_jsonpath_list_node_t *head = NULL, *node; src/zabbix_server/poller/checks_snmp.c:1059: error: DEAD_STORE The value written to &anOID_len (type unsigned long) is never used. 1057. struct snmp_pdu *pdu, *response; 1058. oid anOID[MAX_OID_LEN], rootOID[MAX_OID_LEN]; 1059. > size_t anOID_len = MAX_OID_LEN, rootOID_len = MAX_OID_LEN, root_string_len, root_numeric_len; 1060. char oid_index[MAX_STRING_LEN]; 1061. struct variable_list *var; src/zabbix_server/housekeeper/housekeeper.c:1149: error: UNINITIALIZED_VALUE The value read from sleeptime was never initialized. 1147. zbx_sleep_forever(); 1148. else 1149. > zbx_sleep_loop(sleeptime); 1150. 1151. if (!ZBX_IS_RUNNING()) src/zabbix_agent/procstat.c:1168: error: NULL_DEREFERENCE pointer `&processes->values` last assigned on line 1141 could be null and is dereferenced by call to `zbx_proc_free_processes()` at line 1168, column 2. 1166. zbx_vector_uint64_destroy(&pids); 1167. 1168. > zbx_proc_free_processes(&processes); 1169. zbx_vector_ptr_destroy(&processes); 1170. src/zabbix_server/lld/lld.c:1205: error: UNINITIALIZED_VALUE The value read from hostid was never initialized. 1203. now = time(NULL); 1204. 1205. > if (SUCCEED != lld_update_items(hostid, lld_ruleid, &lld_rows, &lld_macro_paths, error, lifetime, now)) 1206. { 1207. zabbix_log(LOG_LEVEL_DEBUG, "cannot update/add items because parent host was removed while" src/zabbix_server/lld/lld.c:1214: error: UNINITIALIZED_VALUE The value read from hostid was never initialized. 1212. lld_item_links_sort(&lld_rows); 1213. 1214. > if (SUCCEED != lld_update_triggers(hostid, lld_ruleid, &lld_rows, &lld_macro_paths, error, lifetime, now)) 1215. { 1216. zabbix_log(LOG_LEVEL_DEBUG, "cannot update/add triggers because parent host was removed while" src/zabbix_server/lld/lld.c:1221: error: UNINITIALIZED_VALUE The value read from hostid was never initialized. 1219. } 1220. 1221. > if (SUCCEED != lld_update_graphs(hostid, lld_ruleid, &lld_rows, &lld_macro_paths, error, lifetime, now)) 1222. { 1223. zabbix_log(LOG_LEVEL_DEBUG, "cannot update/add graphs because parent host was removed while" src/zabbix_server/lld/lld.c:1205: error: UNINITIALIZED_VALUE The value read from lifetime was never initialized. 1203. now = time(NULL); 1204. 1205. > if (SUCCEED != lld_update_items(hostid, lld_ruleid, &lld_rows, &lld_macro_paths, error, lifetime, now)) 1206. { 1207. zabbix_log(LOG_LEVEL_DEBUG, "cannot update/add items because parent host was removed while" src/zabbix_server/lld/lld.c:1214: error: UNINITIALIZED_VALUE The value read from lifetime was never initialized. 1212. lld_item_links_sort(&lld_rows); 1213. 1214. > if (SUCCEED != lld_update_triggers(hostid, lld_ruleid, &lld_rows, &lld_macro_paths, error, lifetime, now)) 1215. { 1216. zabbix_log(LOG_LEVEL_DEBUG, "cannot update/add triggers because parent host was removed while" src/zabbix_server/lld/lld.c:1221: error: UNINITIALIZED_VALUE The value read from lifetime was never initialized. 1219. } 1220. 1221. > if (SUCCEED != lld_update_graphs(hostid, lld_ruleid, &lld_rows, &lld_macro_paths, error, lifetime, now)) 1222. { 1223. zabbix_log(LOG_LEVEL_DEBUG, "cannot update/add graphs because parent host was removed while" src/zabbix_server/lld/lld.c:1228: error: UNINITIALIZED_VALUE The value read from lifetime was never initialized. 1226. } 1227. 1228. > lld_update_hosts(lld_ruleid, &lld_rows, &lld_macro_paths, error, lifetime, now); 1229. 1230. /* add informative warning to the error message about lack of data for macros used in filter */ src/libs/zbxalgo/prediction.c:1203: error: UNINITIALIZED_VALUE The value read from result was never initialized. 1201. result = ZBX_MATH_ERROR; 1202. } 1203. > else if (ZBX_IS_NAN(result)) 1204. { 1205. zabbix_log(LOG_LEVEL_DEBUG, "numerical error"); src/libs/zbxalgo/prediction.c:1208: error: UNINITIALIZED_VALUE The value read from result was never initialized. 1206. result = ZBX_MATH_ERROR; 1207. } 1208. > else if (0.0 > result || DB_INFINITY < result) 1209. { 1210. result = DB_INFINITY; src/libs/zbxalgo/prediction.c:1208: error: UNINITIALIZED_VALUE The value read from result was never initialized. 1206. result = ZBX_MATH_ERROR; 1207. } 1208. > else if (0.0 > result || DB_INFINITY < result) 1209. { 1210. result = DB_INFINITY; src/libs/zbxalgo/prediction.c:1214: error: UNINITIALIZED_VALUE The value read from result was never initialized. 1212. 1213. zbx_matrix_free(coefficients); 1214. > return result; 1215. } src/zabbix_server/events.c:1192: error: UNINITIALIZED_VALUE The value read from scope was never initialized. 1190. } 1191. 1192. > if (ZBX_CHECK_OLD_EVENTS == scope) 1193. { 1194. if (ZBX_PROBLEM_STATE_UNKNOWN == *problem_state) src/libs/zbxsysinfo/linux/proc.c:1212: error: UNINITIALIZED_VALUE The value read from cmdline_nbytes was never initialized. 1210. 1211. /* according to proc(5) the arguments are separated by '\0' */ 1212. > for (i = 0; i < cmdline_nbytes - 1; i++) 1213. if ('\0' == cmdline[i]) 1214. cmdline[i] = ' '; src/zabbix_server/preprocessor/preprocessing.c:1195: error: UNINITIALIZED_VALUE The value read from value_len was never initialized. 1193. 1194. offset += zbx_deserialize_char(offset, value_type); 1195. > offset += zbx_deserialize_str(offset, value, value_len); 1196. offset += zbx_deserialize_int(offset, &ts->sec); 1197. offset += zbx_deserialize_int(offset, &ts->ns); src/libs/zbxcommon/str.c:1199: error: NULL_DEREFERENCE pointer `tm` last assigned on line 1197 could be null and is dereferenced at line 1199, column 4. 1197. tm = zbx_localtime(&date, tz); 1198. zbx_snprintf(buffer, sizeof(buffer), "%.4d.%.2d.%.2d", 1199. > tm->tm_year + 1900, 1200. tm->tm_mon + 1, 1201. tm->tm_mday); src/libs/zbxdbupgrade/dbupgrade_5010.c:1244: error: UNINITIALIZED_VALUE The value read from new_fieldid was never initialized. 1242. if (ZBX_DB_OK > DBexecute("insert into widget_field (widget_fieldid,widgetid,type,name,value_int," 1243. "value_str,value_itemid,value_graphid) values (" ZBX_FS_UI64 "," ZBX_FS_UI64 ",%d," 1244. > "'%s',%d,'%s',%s,%s)", new_fieldid++, widget->widgetid, 1245. f->type, f->name, f->value_int, url_esc, s1, s2)) 1246. { src/libs/zbxcommon/str.c:1213: error: NULL_DEREFERENCE pointer `tm` last assigned on line 1211 could be null and is dereferenced at line 1213, column 4. 1211. tm = zbx_localtime(&time, tz); 1212. zbx_snprintf(buffer, sizeof(buffer), "%.2d:%.2d:%.2d", 1213. > tm->tm_hour, 1214. tm->tm_min, 1215. tm->tm_sec); src/zabbix_server/preprocessor/item_preproc.c:1252: error: NULL_DEREFERENCE pointer `value_str.data.str` last assigned on line 1246 could be null and is dereferenced by call to `strlen()` at line 1252, column 55. 1250. } 1251. 1252. > if (NULL == (doc = xmlReadMemory(value_str.data.str, strlen(value_str.data.str), "noname.xml", NULL, 0))) 1253. goto out; 1254. src/libs/zbxdbupgrade/dbupgrade_5010.c:1383: error: UNINITIALIZED_VALUE The value read from offsets_x[_] was never initialized. 1381. 1382. memset((void *)&w, 0, sizeof(zbx_db_widget_t)); 1383. > w.x = offsets_x[si->x]; 1384. w.y = offsets_y[si->y]; 1385. w.width = offsets_x[offset_idx_x] - offsets_x[si->x]; src/libs/zbxdbupgrade/dbupgrade_5010.c:1385: error: UNINITIALIZED_VALUE The value read from offsets_x[_] was never initialized. 1383. w.x = offsets_x[si->x]; 1384. w.y = offsets_y[si->y]; 1385. > w.width = offsets_x[offset_idx_x] - offsets_x[si->x]; 1386. w.height = offsets_y[offset_idx_y] - offsets_y[si->y]; 1387. src/libs/zbxdbupgrade/dbupgrade_5010.c:1384: error: UNINITIALIZED_VALUE The value read from offsets_y[_] was never initialized. 1382. memset((void *)&w, 0, sizeof(zbx_db_widget_t)); 1383. w.x = offsets_x[si->x]; 1384. > w.y = offsets_y[si->y]; 1385. w.width = offsets_x[offset_idx_x] - offsets_x[si->x]; 1386. w.height = offsets_y[offset_idx_y] - offsets_y[si->y]; src/libs/zbxdbupgrade/dbupgrade_5010.c:1386: error: UNINITIALIZED_VALUE The value read from offsets_y[_] was never initialized. 1384. w.y = offsets_y[si->y]; 1385. w.width = offsets_x[offset_idx_x] - offsets_x[si->x]; 1386. > w.height = offsets_y[offset_idx_y] - offsets_y[si->y]; 1387. 1388. /* skip screen items not fitting on the dashboard */ src/zabbix_server/poller/checks_snmp.c:1395: error: UNINITIALIZED_VALUE The value read from mapping[_] was never initialized. 1393. } 1394. 1395. > j = mapping[i]; 1396. 1397. if (parsed_oid_lens[j] != var->name_length || src/zabbix_server/poller/checks_snmp.c:1463: error: UNINITIALIZED_VALUE The value read from mapping[_] was never initialized. 1461. } 1462. 1463. > j = mapping[i]; 1464. 1465. zabbix_log(LOG_LEVEL_DEBUG, "%s() snmp_synch_response() errindex:%ld OID:'%s'", __func__, src/zabbix_server/poller/checks_snmp.c:1397: error: UNINITIALIZED_VALUE The value read from parsed_oid_lens[_] was never initialized. 1395. j = mapping[i]; 1396. 1397. > if (parsed_oid_lens[j] != var->name_length || 1398. 0 != memcmp(parsed_oids[j], var->name, parsed_oid_lens[j] * sizeof(oid))) 1399. { src/zabbix_server/poller/checks_snmp.c:1402: error: UNINITIALIZED_VALUE The value read from parsed_oid_lens[_] was never initialized. 1400. char sent_oid[ITEM_SNMP_OID_LEN_MAX], received_oid[ITEM_SNMP_OID_LEN_MAX]; 1401. 1402. > zbx_snmp_dump_oid(sent_oid, sizeof(sent_oid), parsed_oids[j], parsed_oid_lens[j]); 1403. zbx_snmp_dump_oid(received_oid, sizeof(received_oid), var->name, var->name_length); 1404. src/zabbix_server/vmware/vmware.c:1316: error: NULL_DEREFERENCE pointer `cluster` last assigned on line 1315 could be null and is dereferenced at line 1316, column 2. 1314. 1315. cluster = (zbx_vmware_cluster_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_cluster_t)); 1316. > cluster->id = vmware_shared_strdup(src->id); 1317. cluster->name = vmware_shared_strdup(src->name); 1318. cluster->status = vmware_shared_strdup(src->status); src/zabbix_server/vmware/vmware.c:1339: error: NULL_DEREFERENCE pointer `event` last assigned on line 1338 could be null and is dereferenced at line 1339, column 2. 1337. 1338. event = (zbx_vmware_event_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_event_t)); 1339. > event->key = src->key; 1340. event->message = vmware_shared_strdup(src->message); 1341. event->timestamp = src->timestamp; src/zabbix_server/vmware/vmware.c:1362: error: NULL_DEREFERENCE pointer `diskextent` last assigned on line 1361 could be null and is dereferenced at line 1362, column 2. 1360. 1361. diskextent = (zbx_vmware_diskextent_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_diskextent_t)); 1362. > diskextent->diskname = vmware_shared_strdup(src->diskname); 1363. diskextent->partitionid = src->partitionid; 1364. src/libs/zbxdbhigh/proxy.c:1852: error: DEAD_STORE The value written to &field_differ (type int) is never used. 1850. f++) 1851. { 1852. > int field_differ = 1; 1853. 1854. /* parse values for the entry (lines 10-12 in T1) */ src/libs/zbxdbhigh/proxy.c:1428: error: NULL_DEREFERENCE pointer `table_items` last assigned on line 1424 could be null and is dereferenced by call to `DBget_field()` at line 1428, column 47. 1426. /* do not update existing lastlogsize and mtime fields */ 1427. zbx_vector_ptr_create(&skip_fields); 1428. > zbx_vector_ptr_append(&skip_fields, (void *)DBget_field(table_items, "lastlogsize")); 1429. zbx_vector_ptr_append(&skip_fields, (void *)DBget_field(table_items, "mtime")); 1430. zbx_vector_ptr_sort(&skip_fields, ZBX_DEFAULT_PTR_COMPARE_FUNC); src/libs/zbxdbhigh/proxy.c:1642: error: UNINITIALIZED_VALUE The value read from moves.values_num was never initialized. 1640. /* are inserted and existing ones are updated is a bit complex. Let's take a simpler approach */ 1641. /* - delete affected old records and insert the new ones. */ 1642. > if (0 != moves.values_num) 1643. { 1644. zbx_vector_uint64_append_array(&ins, moves.values, moves.values_num); src/libs/zbxdbhigh/proxy.c:1644: error: UNINITIALIZED_VALUE The value read from moves.values_num was never initialized. 1642. if (0 != moves.values_num) 1643. { 1644. > zbx_vector_uint64_append_array(&ins, moves.values, moves.values_num); 1645. zbx_vector_uint64_sort(&ins, ZBX_DEFAULT_UINT64_COMPARE_FUNC); 1646. zbx_vector_uint64_append_array(del, moves.values, moves.values_num); src/libs/zbxdbhigh/proxy.c:1646: error: UNINITIALIZED_VALUE The value read from moves.values_num was never initialized. 1644. zbx_vector_uint64_append_array(&ins, moves.values, moves.values_num); 1645. zbx_vector_uint64_sort(&ins, ZBX_DEFAULT_UINT64_COMPARE_FUNC); 1646. > zbx_vector_uint64_append_array(del, moves.values, moves.values_num); 1647. zbx_vector_uint64_sort(del, ZBX_DEFAULT_UINT64_COMPARE_FUNC); 1648. } src/libs/zbxdbhigh/proxy.c:1672: error: UNINITIALIZED_VALUE The value read from moves.values_num was never initialized. 1670. /* 'httptest' tables to eliminate conflicts in the 'macro', 'hostid,macro', 'hostid,key_', */ 1671. /* 'name', 'name' and 'hostid,name' unique indices */ 1672. > if (0 < moves.values_num) 1673. { 1674. sql_offset = 0; src/zabbix_server/vmware/vmware.c:1385: error: NULL_DEREFERENCE pointer `datastore` last assigned on line 1384 could be null and is dereferenced at line 1385, column 2. 1383. 1384. datastore = (zbx_vmware_datastore_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_datastore_t)); 1385. > datastore->uuid = vmware_shared_strdup(src->uuid); 1386. datastore->name = vmware_shared_strdup(src->name); 1387. datastore->id = vmware_shared_strdup(src->id); src/zabbix_agent/logfiles/logfiles.c:1421: error: NULL_DEREFERENCE pointer `logfile_candidate` last assigned on line 1419 could be null and is dereferenced by call to `stat()` at line 1421, column 11. 1419. logfile_candidate = zbx_dsprintf(NULL, "%s%s", directory, filename); 1420. 1421. > if (0 == zbx_stat(logfile_candidate, &file_buf)) 1422. { 1423. if (S_ISREG(file_buf.st_mode) && src/zabbix_server/vmware/vmware.c:1431: error: NULL_DEREFERENCE pointer `datacenter` last assigned on line 1430 could be null and is dereferenced at line 1431, column 2. 1429. 1430. datacenter = (zbx_vmware_datacenter_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_datacenter_t)); 1431. > datacenter->name = vmware_shared_strdup(src->name); 1432. datacenter->id = vmware_shared_strdup(src->id); 1433. src/zabbix_server/vmware/vmware.c:1453: error: NULL_DEREFERENCE pointer `dev` last assigned on line 1452 could be null and is dereferenced at line 1453, column 2. 1451. 1452. dev = (zbx_vmware_dev_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_dev_t)); 1453. > dev->type = src->type; 1454. dev->instance = vmware_shared_strdup(src->instance); 1455. dev->label = vmware_shared_strdup(src->label); src/zabbix_server/vmware/vmware.c:1477: error: NULL_DEREFERENCE pointer `fs` last assigned on line 1476 could be null and is dereferenced at line 1477, column 2. 1475. 1476. fs = (zbx_vmware_fs_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_fs_t)); 1477. > fs->path = vmware_shared_strdup(src->path); 1478. fs->capacity = src->capacity; 1479. fs->free_space = src->free_space; src/libs/zbxdbhigh/db.c:1484: error: NULL_DEREFERENCE pointer `&autoreg_hosts->values` last assigned on line 1482 could be null and is dereferenced by call to `DBregister_host_prepare()` at line 1484, column 2. 1482. zbx_vector_ptr_create(&autoreg_hosts); 1483. 1484. > DBregister_host_prepare(&autoreg_hosts, host, ip, dns, port, connection_type, host_metadata, flag, now); 1485. DBregister_host_flush(&autoreg_hosts, proxy_hostid); 1486. src/zabbix_server/vmware/vmware.c:1504: error: NULL_DEREFERENCE pointer `props` last assigned on line 1501 could be null and is dereferenced at line 1504, column 3. 1502. 1503. for (i = 0; i < props_num; i++) 1504. > props[i] = vmware_shared_strdup(src[i]); 1505. 1506. return props; src/libs/zbxsysinfo/sysinfo.c:1512: error: DEAD_STORE The value written to &dst (type char*) is never used. 1510. *dst++ = *param; 1511. } 1512. > *--dst = '\0'; 1513. } 1514. src/libs/zbxsysinfo/sysinfo.c:1562: error: DEAD_STORE The value written to &sz_dst (type unsigned long) is never used. 1560. (*param)[--sz_dst] = '\\'; 1561. } 1562. > (*param)[--sz_dst] = '"'; 1563. 1564. return SUCCEED; src/libs/zbxdbhigh/template_item.c:1630: error: UNINITIALIZED_VALUE The value read from override_conditionid was never initialized. 1628. override_condition = (lld_override_codition_t *)override->override_conditions.values[j]; 1629. 1630. > zbx_db_insert_add_values(&db_insert_oconditions, override_conditionid, overrideid, 1631. (int)override_condition->operator, override_condition->macro, 1632. override_condition->value); src/libs/zbxdbhigh/template_item.c:1636: error: UNINITIALIZED_VALUE The value read from override_conditionid was never initialized. 1634. if (CONDITION_EVAL_TYPE_EXPRESSION == override->evaltype) 1635. { 1636. > update_template_lld_formula(&override->formula, 1637. override_condition->override_conditionid, override_conditionid); 1638. } src/libs/zbxdbhigh/template_item.c:1640: error: UNINITIALIZED_VALUE The value read from override_conditionid was never initialized. 1638. } 1639. 1640. > override_conditionid++; 1641. } 1642. src/libs/zbxdbhigh/template_item.c:1651: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1649. override_operation = (zbx_lld_override_operation_t *)override->override_operations.values[j]; 1650. 1651. > zbx_db_insert_add_values(&db_insert_ooperations, override_operationid, overrideid, 1652. (int)override_operation->operationtype, (int)override_operation->operator, 1653. override_operation->value); src/libs/zbxdbhigh/template_item.c:1657: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1655. if (ZBX_PROTOTYPE_STATUS_COUNT != override_operation->status) 1656. { 1657. > zbx_db_insert_add_values(&db_insert_opstatus, override_operationid, 1658. (int)override_operation->status); 1659. } src/libs/zbxdbhigh/template_item.c:1663: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1661. if (ZBX_PROTOTYPE_DISCOVER_COUNT != override_operation->discover) 1662. { 1663. > zbx_db_insert_add_values(&db_insert_opdiscover, override_operationid, 1664. (int)override_operation->discover); 1665. } src/libs/zbxdbhigh/template_item.c:1669: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1667. if (NULL != override_operation->delay) 1668. { 1669. > zbx_db_insert_add_values(&db_insert_opperiod, override_operationid, 1670. override_operation->delay); 1671. } src/libs/zbxdbhigh/template_item.c:1675: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1673. if (NULL != override_operation->history) 1674. { 1675. > zbx_db_insert_add_values(&db_insert_ophistory, override_operationid, 1676. override_operation->history); 1677. } src/libs/zbxdbhigh/template_item.c:1681: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1679. if (NULL != override_operation->trends) 1680. { 1681. > zbx_db_insert_add_values(&db_insert_optrends, override_operationid, 1682. override_operation->trends); 1683. } src/libs/zbxdbhigh/template_item.c:1687: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1685. if (TRIGGER_SEVERITY_COUNT != override_operation->severity) 1686. { 1687. > zbx_db_insert_add_values(&db_insert_opseverity, override_operationid, 1688. (int)override_operation->severity); 1689. } src/libs/zbxdbhigh/template_item.c:1695: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1693. zbx_db_tag_t *tag = override_operation->tags.values[k]; 1694. 1695. > zbx_db_insert_add_values(&db_insert_optag, __UINT64_C(0), override_operationid, 1696. tag->tag, tag->value); 1697. } src/libs/zbxdbhigh/template_item.c:1701: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1699. for (k = 0; k < override_operation->templateids.values_num; k++) 1700. { 1701. > zbx_db_insert_add_values(&db_insert_optemplate, __UINT64_C(0), override_operationid, 1702. override_operation->templateids.values[k]); 1703. } src/libs/zbxdbhigh/template_item.c:1707: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1705. if (HOST_INVENTORY_COUNT != override_operation->inventory_mode) 1706. { 1707. > zbx_db_insert_add_values(&db_insert_opinventory, override_operationid, 1708. (int)override_operation->inventory_mode); 1709. } src/libs/zbxdbhigh/template_item.c:1711: error: UNINITIALIZED_VALUE The value read from override_operationid was never initialized. 1709. } 1710. 1711. > override_operationid++; 1712. } 1713. src/libs/zbxdbhigh/template_item.c:1630: error: UNINITIALIZED_VALUE The value read from overrideid was never initialized. 1628. override_condition = (lld_override_codition_t *)override->override_conditions.values[j]; 1629. 1630. > zbx_db_insert_add_values(&db_insert_oconditions, override_conditionid, overrideid, 1631. (int)override_condition->operator, override_condition->macro, 1632. override_condition->value); src/libs/zbxdbhigh/template_item.c:1644: error: UNINITIALIZED_VALUE The value read from overrideid was never initialized. 1642. 1643. /* prepare lld_override insert after formula is updated */ 1644. > zbx_db_insert_add_values(&db_insert, overrideid, (*pitem)->itemid, override->name, (int)override->step, 1645. (int)override->evaltype, override->formula, (int)override->stop); 1646. src/libs/zbxdbhigh/template_item.c:1651: error: UNINITIALIZED_VALUE The value read from overrideid was never initialized. 1649. override_operation = (zbx_lld_override_operation_t *)override->override_operations.values[j]; 1650. 1651. > zbx_db_insert_add_values(&db_insert_ooperations, override_operationid, overrideid, 1652. (int)override_operation->operationtype, (int)override_operation->operator, 1653. override_operation->value); src/libs/zbxdbhigh/template_item.c:1714: error: UNINITIALIZED_VALUE The value read from overrideid was never initialized. 1712. } 1713. 1714. > overrideid++; 1715. } 1716. src/zabbix_server/vmware/vmware.c:1563: error: NULL_DEREFERENCE pointer `dsname` last assigned on line 1561 could be null and is dereferenced at line 1563, column 2. 1561. dsname = (zbx_vmware_dsname_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_dsname_t)); 1562. 1563. > dsname->name = vmware_shared_strdup(src->name); 1564. 1565. VMWARE_VECTOR_CREATE(&dsname->hvdisks, vmware_hvdisk); src/libs/zbxserver/expression.c:1674: error: DEAD_STORE The value written to &buf_offset (type unsigned long) is never used. 1672. 1673. if (0 != buf_offset) 1674. > buf[--buf_offset] = '\0'; 1675. 1676. *replace_to = buf; src/libs/zbxdbupgrade/dbupgrade_3050.c:1620: error: DEAD_STORE The value written to &ret (type int) is never used. 1618. DB_RESULT result; 1619. DB_ROW row; 1620. > int ret = FAIL; 1621. zbx_db_insert_t db_insert; 1622. src/libs/zbxserver/evalfunc.c:1718: error: UNINITIALIZED_VALUE The value read from nodata_win.values_num was never initialized. 1716. if (0 != item->host.proxy_hostid && 0 != lazy) 1717. { 1718. > zabbix_log(LOG_LEVEL_TRACE, "Nodata in %s() flag:%d values_num:%d start_time:%d period:%d", 1719. __func__, nodata_win.flags, nodata_win.values_num, ts.sec - period, period); 1720. } src/libs/zbxcomms/comms.c:1713: error: UNINITIALIZED_VALUE The value read from err was never initialized. 1711. 1712. if (ZBX_PROTO_ERROR == res) 1713. > zbx_set_socket_strerror("ZBX_TCP_READ() failed: %s", strerror_from_system(err)); 1714. 1715. return res; src/zabbix_server/preprocessor/item_preproc.c:1773: error: DEAD_STORE The value written to ¶ms (type char const *) is never used. 1771. } 1772. 1773. > hdr_line = ('1' == *(++params) ? 1 : 0); 1774. 1775. if ('\0' == *data) src/zabbix_server/preprocessor/item_preproc.c:1709: error: NULL_DEREFERENCE pointer `value->data.str` last assigned on line 1703 could be null and is dereferenced by call to `strlen()` at line 1709, column 13. 1707. zbx_json_initarray(&json, ZBX_JSON_STAT_BUF_LEN); 1708. data = value->data.str; 1709. > data_len = strlen(value->data.str); 1710. 1711. #define CSV_SEP_LINE "sep=" src/libs/zbxdbhigh/db.c:1743: error: UNINITIALIZED_VALUE The value read from autoreg_hostid was never initialized. 1741. if (0 == autoreg_host->autoreg_hostid) 1742. { 1743. > autoreg_host->autoreg_hostid = autoreg_hostid++; 1744. 1745. zbx_db_insert_add_values(&db_insert, autoreg_host->autoreg_hostid, proxy_hostid, src/libs/zbxcomms/comms.c:1834: error: UNINITIALIZED_VALUE The value read from protocol_version was never initialized. 1832. 1833. /* compressed protocol stores uncompressed packet size in the reserved data */ 1834. > if (0 != (protocol_version & ZBX_TCP_COMPRESS) && ZBX_MAX_RECV_DATA_SIZE < reserved) 1835. { 1836. zabbix_log(LOG_LEVEL_WARNING, "Uncompressed message size " ZBX_FS_UI64 src/libs/zbxcomms/comms.c:1869: error: UNINITIALIZED_VALUE The value read from protocol_version was never initialized. 1867. if (buf_stat_bytes + buf_dyn_bytes == expected_len) 1868. { 1869. > if (0 != (protocol_version & ZBX_TCP_COMPRESS)) 1870. { 1871. char *out; src/libs/zbxcomms/comms.c:1937: error: UNINITIALIZED_VALUE The value read from protocol_version was never initialized. 1935. else if (ZBX_TCP_EXPECT_VERSION_VALIDATE == expect) 1936. { 1937. > zabbix_log(LOG_LEVEL_WARNING, "Message from %s is using unsupported protocol version \"%d\"." 1938. " Message ignored.", s->peer, protocol_version); 1939. nbytes = ZBX_PROTO_ERROR; src/libs/zbxcommon/misc.c:1799: error: NULL_DEREFERENCE pointer `tm` last assigned on line 1798 could be null and is dereferenced at line 1799, column 15. 1797. 1798. tm = localtime(&time_start); 1799. > dst_start = tm->tm_isdst; 1800. 1801. while (end > start + 1) src/libs/zbxcommon/misc.c:1808: error: NULL_DEREFERENCE pointer `tm` last assigned on line 1806 could be null and is dereferenced at line 1808, column 8. 1806. tm = localtime(&time_mid); 1807. 1808. > if (tm->tm_isdst == dst_start) 1809. start = mid; 1810. else src/zabbix_agent/logfiles/logfiles.c:2119: error: UNINITIALIZED_VALUE The value read from ret was never initialized. 2117. } 2118. out: 2119. > return ret; 2120. 2121. #undef BUF_SIZE src/zabbix_server/poller/checks_simple_vmware.c:1950: error: UNINITIALIZED_VALUE The value read from disk_capacity was never initialized. 1948. { 1949. case ZBX_VMWARE_DATASTORE_SIZE_TOTAL: 1950. > SET_UI64_RESULT(result, disk_capacity); 1951. break; 1952. case ZBX_VMWARE_DATASTORE_SIZE_FREE: src/zabbix_server/poller/checks_simple_vmware.c:1953: error: UNINITIALIZED_VALUE The value read from disk_capacity was never initialized. 1951. break; 1952. case ZBX_VMWARE_DATASTORE_SIZE_FREE: 1953. > SET_UI64_RESULT(result, disk_capacity - disk_used); 1954. break; 1955. case ZBX_VMWARE_DATASTORE_SIZE_UNCOMMITTED: src/zabbix_server/poller/checks_simple_vmware.c:1959: error: UNINITIALIZED_VALUE The value read from disk_capacity was never initialized. 1957. break; 1958. case ZBX_VMWARE_DATASTORE_SIZE_PFREE: 1959. > SET_DBL_RESULT(result, 0 != disk_capacity ? 1960. (double) (disk_capacity - disk_used) / disk_capacity * 100 : 0); 1961. break; src/zabbix_server/poller/checks_simple_vmware.c:1956: error: UNINITIALIZED_VALUE The value read from disk_provisioned was never initialized. 1954. break; 1955. case ZBX_VMWARE_DATASTORE_SIZE_UNCOMMITTED: 1956. > SET_UI64_RESULT(result, disk_provisioned - disk_used); 1957. break; 1958. case ZBX_VMWARE_DATASTORE_SIZE_PFREE: src/zabbix_server/poller/checks_simple_vmware.c:1953: error: UNINITIALIZED_VALUE The value read from disk_used was never initialized. 1951. break; 1952. case ZBX_VMWARE_DATASTORE_SIZE_FREE: 1953. > SET_UI64_RESULT(result, disk_capacity - disk_used); 1954. break; 1955. case ZBX_VMWARE_DATASTORE_SIZE_UNCOMMITTED: src/zabbix_server/poller/checks_simple_vmware.c:1956: error: UNINITIALIZED_VALUE The value read from disk_used was never initialized. 1954. break; 1955. case ZBX_VMWARE_DATASTORE_SIZE_UNCOMMITTED: 1956. > SET_UI64_RESULT(result, disk_provisioned - disk_used); 1957. break; 1958. case ZBX_VMWARE_DATASTORE_SIZE_PFREE: src/zabbix_server/poller/checks_simple_vmware.c:1959: error: UNINITIALIZED_VALUE The value read from disk_used was never initialized. 1957. break; 1958. case ZBX_VMWARE_DATASTORE_SIZE_PFREE: 1959. > SET_DBL_RESULT(result, 0 != disk_capacity ? 1960. (double) (disk_capacity - disk_used) / disk_capacity * 100 : 0); 1961. break; src/zabbix_server/poller/checks_simple_vmware.c:1911: error: UNINITIALIZED_VALUE The value read from flags was never initialized. 1909. } 1910. 1911. > if (0 != (flags & ZBX_DATASTORE_COUNTER_PROVISIONED)) 1912. { 1913. ret = vmware_service_get_counter_value_by_path(service, "Datastore", datastore->id, src/zabbix_server/poller/checks_simple_vmware.c:1923: error: UNINITIALIZED_VALUE The value read from flags was never initialized. 1921. } 1922. 1923. > if (0 != (flags & ZBX_DATASTORE_COUNTER_USED)) 1924. { 1925. ret = vmware_service_get_counter_value_by_path(service, "Datastore", datastore->id, src/zabbix_server/poller/checks_simple_vmware.c:1935: error: UNINITIALIZED_VALUE The value read from flags was never initialized. 1933. } 1934. 1935. > if (0 != (flags & ZBX_DATASTORE_COUNTER_CAPACITY)) 1936. { 1937. ret = vmware_service_get_counter_value_by_path(service, "Datastore", datastore->id, src/zabbix_server/poller/checks_snmp.c:1941: error: UNINITIALIZED_VALUE The value read from to_verify[_] was never initialized. 1939. for (i = 0; i < to_verify_num; i++) 1940. { 1941. > j = to_verify[i]; 1942. 1943. if (SUCCEED != errcodes[j]) src/zabbix_server/poller/checks_snmp.c:1979: error: UNINITIALIZED_VALUE The value read from to_walk[_] was never initialized. 1977. int errcode; 1978. 1979. > j = to_walk[i]; 1980. 1981. /* see whether this OID tree was already walked for another item */ src/zabbix_server/poller/checks_snmp.c:2026: error: UNINITIALIZED_VALUE The value read from to_walk[_] was never initialized. 2024. for (i = 0; i < to_walk_num; i++) 2025. { 2026. > j = to_walk[i]; 2027. 2028. if (SUCCEED != errcodes[j]) src/libs/zbxipcservice/ipcservice.c:1909: error: DEAD_STORE The value written to &ret (type int) is never used. 1907. zbx_uint32_t size) 1908. { 1909. > int ret = FAIL; 1910. 1911. zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __func__); src/libs/zbxdbhigh/template_item.c:1976: error: NULL_DEREFERENCE pointer `&lld_rules->values` last assigned on line 1943 could be null and is dereferenced by call to `zbx_vector_ptr_clear_ext()` at line 1976, column 2. 1974. zbx_vector_uint64_destroy(&lld_itemids); 1975. out: 1976. > zbx_vector_ptr_clear_ext(&lld_rules, (zbx_clean_func_t)free_lld_rule_map); 1977. zbx_vector_ptr_destroy(&lld_rules); 1978. src/libs/zbxcommon/misc.c:2030: error: UNINITIALIZED_VALUE The value read from interval was never initialized. 2028. interval = 1; 2029. 2030. > if (0 == interval && 0 == simple_interval) 2031. { 2032. *error = zbx_dsprintf(*error, "Invalid flexible interval \"%.*s\".", (int)(delim - str), src/zabbix_server/escalator/escalator.c:2459: error: UNINITIALIZED_VALUE The value read from r_event was never initialized. 2457. escalation_acknowledge(escalation, action, event, r_event, default_timezone); 2458. } 2459. > else if (NULL != r_event) 2460. { 2461. if (0 == escalation->esc_step) src/libs/zbxjson/jsonpath.c:2372: error: UNINITIALIZED_VALUE The value read from ret was never initialized. 2370. zbx_vector_json_destroy(&input); 2371. 2372. > return ret; 2373. } 2374. src/zabbix_server/lld/lld_trigger.c:2771: error: UNINITIALIZED_VALUE The value read from triggertagid was never initialized. 2769. if (0 == tag->triggertagid) 2770. { 2771. > tag->triggertagid = triggertagid++; 2772. zbx_db_insert_add_values(&db_insert_ttags, tag->triggertagid, trigger->triggerid, 2773. tag->tag, tag->value); src/libs/zbxjson/jsonpath.c:2476: error: UNINITIALIZED_VALUE The value read from next was never initialized. 2474. jpquery.definite = 1; 2475. 2476. > for (ptr++; '\0' != *ptr; ptr = next) 2477. { 2478. char prefix; src/libs/zbxcommon/str.c:2607: error: DEAD_STORE The value written to &i (type int) is never used. 2605. 2606. (*arr)[i] = zbx_strdup((*arr)[i], entry); 2607. > (*arr)[++i] = NULL; 2608. } 2609. src/zabbix_server/lld/lld_item.c:2671: error: DEAD_STORE The value written to ¶ms_num (type int) is never used. 2669. const zbx_vector_ptr_t *lld_macro_paths, char **sub_params) 2670. { 2671. > int params_num = 1, flags1, flags2; 2672. 2673. switch (type) src/zabbix_server/lld/lld_item.c:2726: error: UNINITIALIZED_VALUE The value read from flags2 was never initialized. 2724. 2725. substitute_lld_macros(¶m1, &lld_row->jp_row, lld_macro_paths, flags1, NULL, 0); 2726. > substitute_lld_macros(¶m2, &lld_row->jp_row, lld_macro_paths, flags2, NULL, 0); 2727. 2728. params_alloc = strlen(param1) + strlen(param2) + 2; src/libs/zbxdbhigh/db.c:2856: error: NULL_DEREFERENCE pointer `&values->values` last assigned on line 2818 could be null and is dereferenced by call to `zbx_vector_ptr_clear_ext()` at line 2856, column 2. 2854. zbx_db_insert_add_values_dyn(self, (const zbx_db_value_t **)values.values, values.values_num); 2855. 2856. > zbx_vector_ptr_clear_ext(&values, zbx_ptr_free); 2857. zbx_vector_ptr_destroy(&values); 2858. } src/zabbix_agent/logfiles/logfiles.c:2940: error: UNINITIALIZED_VALUE The value read from old_last was never initialized. 2938. 2939. /* find the first file to continue from in the new file list */ 2940. > if (0 < max_old_seq && -1 == (*start_idx = find_old2new(old2new, logfiles_num, old_last))) 2941. { 2942. /* Cannot find the successor of the last processed file from the previous check. */ src/libs/zbxserver/expression.c:3007: error: MEMORY_LEAK memory dynamically allocated by call to `zbx_strdup2()` at line 3006, column 17 is not reachable after line 3007, column 3. 3005. { 3006. *replace_to = zbx_strdup(*replace_to, event->trigger.opdata); 3007. > substitute_simple_macros_impl(NULL, event, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tz, replace_to, 3008. MACRO_TYPE_TRIGGER_DESCRIPTION, error, maxerrlen); 3009. } src/libs/zbxcommon/str.c:3025: error: DEAD_STORE The value written to &ptr_buffer (type char*) is never used. 3023. 3024. *ptr_buffer++ = '"'; 3025. > *ptr_buffer++ = '\0'; 3026. 3027. return buffer; src/libs/zbxserver/expression.c:4874: error: UNINITIALIZED_VALUE The value read from c was never initialized. 4872. 4873. if (ZBX_TOKEN_USER_MACRO == token.type || (ZBX_TOKEN_MACRO == token.type && 0 == indexed_macro)) 4874. > (*data)[token.loc.r + 1] = c; 4875. 4876. if (NULL != replace_to) src/libs/zbxcommon/str.c:3238: error: DEAD_STORE The value written to &sz_dst (type unsigned long) is never used. 3236. (*param)[--sz_dst] = '\\'; 3237. } 3238. > (*param)[--sz_dst] = '"'; 3239. 3240. return SUCCEED; src/libs/zbxdbhigh/db.c:3229: error: NULL_DEREFERENCE pointer `t` last assigned on line 3225 could be null and is dereferenced at line 3229, column 88. 3227. if (NULL == add_field) 3228. { 3229. > result = DBselect("select null from %s where %s=" ZBX_FS_UI64 ZBX_FOR_UPDATE, table, t->recid, id); 3230. } 3231. else src/libs/zbxdbhigh/db.c:3234: error: NULL_DEREFERENCE pointer `t` last assigned on line 3225 could be null and is dereferenced at line 3234, column 12. 3232. { 3233. result = DBselect("select null from %s where %s=" ZBX_FS_UI64 " and %s=" ZBX_FS_UI64 ZBX_FOR_UPDATE, 3234. > table, t->recid, id, add_field, add_id); 3235. } 3236. src/libs/zbxdbhigh/db.c:3280: error: NULL_DEREFERENCE pointer `t` last assigned on line 3277 could be null and is dereferenced at line 3280, column 55. 3278. 3279. zbx_snprintf_alloc(&sql, &sql_alloc, &sql_offset, "select null from %s where", table); 3280. > DBadd_condition_alloc(&sql, &sql_alloc, &sql_offset, t->recid, ids->values, ids->values_num); 3281. 3282. result = DBselect("%s" ZBX_FOR_UPDATE, sql); src/zabbix_agent/logfiles/logfiles.c:3613: error: UNINITIALIZED_VALUE The value read from big_rec_orig was never initialized. 3611. metric->lastlogsize = lastlogsize_orig; 3612. metric->mtime = mtime_orig; 3613. > metric->big_rec = big_rec_orig; 3614. 3615. /* the old log file list 'metric->logfiles' stays in its place, drop the new list */ src/zabbix_agent/logfiles/logfiles.c:3630: error: UNINITIALIZED_VALUE The value read from big_rec_orig was never initialized. 3628. metric->lastlogsize = lastlogsize_orig; 3629. metric->mtime = mtime_orig; 3630. > metric->big_rec = big_rec_orig; 3631. 3632. /* the old log file list 'metric->logfiles' stays in its place, drop the new list */ src/zabbix_agent/logfiles/logfiles.c:3611: error: UNINITIALIZED_VALUE The value read from lastlogsize_orig was never initialized. 3609. /* during the next check */ 3610. 3611. > metric->lastlogsize = lastlogsize_orig; 3612. metric->mtime = mtime_orig; 3613. metric->big_rec = big_rec_orig; src/zabbix_agent/logfiles/logfiles.c:3628: error: UNINITIALIZED_VALUE The value read from lastlogsize_orig was never initialized. 3626. /* restore original state to try again during the next check */ 3627. 3628. > metric->lastlogsize = lastlogsize_orig; 3629. metric->mtime = mtime_orig; 3630. metric->big_rec = big_rec_orig; src/zabbix_agent/logfiles/logfiles.c:3612: error: UNINITIALIZED_VALUE The value read from mtime_orig was never initialized. 3610. 3611. metric->lastlogsize = lastlogsize_orig; 3612. > metric->mtime = mtime_orig; 3613. metric->big_rec = big_rec_orig; 3614. src/zabbix_agent/logfiles/logfiles.c:3629: error: UNINITIALIZED_VALUE The value read from mtime_orig was never initialized. 3627. 3628. metric->lastlogsize = lastlogsize_orig; 3629. > metric->mtime = mtime_orig; 3630. metric->big_rec = big_rec_orig; 3631. src/zabbix_agent/logfiles/logfiles.c:3586: error: UNINITIALIZED_VALUE The value read from s_count_orig was never initialized. 3584. char buf[ZBX_MAX_UINT64_LEN]; 3585. 3586. > match_count = s_count_orig - s_count; 3587. 3588. zbx_snprintf(buf, sizeof(buf), "%d", match_count); src/libs/zbxdbhigh/host.c:3935: error: UNINITIALIZED_VALUE The value read from tag_index was never initialized. 3933. } 3934. 3935. > if (tag_index < host_prototype->tags.values_num) 3936. { 3937. host_prototype->tags.values[tag_index]->tagid = tagid; src/libs/zbxdbhigh/host.c:3944: error: UNINITIALIZED_VALUE The value read from tag_index was never initialized. 3942. zbx_vector_uint64_append(del_tagids, tagid); 3943. 3944. > tag_index++; 3945. } 3946. DBfree_result(result); src/libs/zbxdbcache/dbconfig.c:3951: error: NULL_DEREFERENCE pointer `timer` last assigned on line 3950 could be null and is dereferenced at line 3951, column 2. 3949. 3950. timer = (zbx_trigger_timer_t *)__config_mem_malloc_func(NULL, sizeof(zbx_trigger_timer_t)); 3951. > timer->type = function->type; 3952. timer->objectid = function->functionid; 3953. timer->triggerid = function->triggerid; src/zabbix_server/lld/lld_item.c:4089: error: UNINITIALIZED_VALUE The value read from application_discoveryid was never initialized. 4087. continue; 4088. 4089. > application->application_discoveryid = application_discoveryid++; 4090. zbx_db_insert_add_values(&db_insert_discovery, application->application_discoveryid, 4091. application->applicationid, application->application_prototypeid, src/zabbix_server/lld/lld_item.c:4054: error: UNINITIALIZED_VALUE The value read from applicationid was never initialized. 4052. if (0 == application->applicationid) 4053. { 4054. > application->applicationid = applicationid++; 4055. zbx_db_insert_add_values(&db_insert, application->applicationid, hostid, application->name, 4056. ZBX_FLAG_DISCOVERY_CREATED); src/zabbix_server/lld/lld_host.c:4086: error: UNINITIALIZED_VALUE The value read from ipmi_authtype was never initialized. 4084. inventory_mode_proto = (char)atoi(row[5]); 4085. 4086. > lld_hosts_get(parent_hostid, &hosts, proxy_hostid, ipmi_authtype, ipmi_privilege, ipmi_username, 4087. ipmi_password, tls_connect, tls_accept, tls_issuer, tls_subject, 4088. tls_psk_identity, tls_psk); src/zabbix_server/lld/lld_host.c:4135: error: UNINITIALIZED_VALUE The value read from ipmi_authtype was never initialized. 4133. 4134. lld_groups_save(&groups, &group_prototypes); 4135. > lld_hosts_save(parent_hostid, &hosts, host_proto, proxy_hostid, ipmi_authtype, ipmi_privilege, 4136. ipmi_username, ipmi_password, tls_connect, tls_accept, 4137. tls_issuer, tls_subject, tls_psk_identity, tls_psk, &del_hostgroupids); src/zabbix_server/lld/lld_host.c:4180: error: UNINITIALIZED_VALUE The value read from ipmi_password was never initialized. 4178. zbx_free(tls_subject); 4179. zbx_free(tls_issuer); 4180. > zbx_free(ipmi_password); 4181. zbx_free(ipmi_username); 4182. src/zabbix_server/lld/lld_host.c:4086: error: UNINITIALIZED_VALUE The value read from ipmi_privilege was never initialized. 4084. inventory_mode_proto = (char)atoi(row[5]); 4085. 4086. > lld_hosts_get(parent_hostid, &hosts, proxy_hostid, ipmi_authtype, ipmi_privilege, ipmi_username, 4087. ipmi_password, tls_connect, tls_accept, tls_issuer, tls_subject, 4088. tls_psk_identity, tls_psk); src/zabbix_server/lld/lld_host.c:4135: error: UNINITIALIZED_VALUE The value read from ipmi_privilege was never initialized. 4133. 4134. lld_groups_save(&groups, &group_prototypes); 4135. > lld_hosts_save(parent_hostid, &hosts, host_proto, proxy_hostid, ipmi_authtype, ipmi_privilege, 4136. ipmi_username, ipmi_password, tls_connect, tls_accept, 4137. tls_issuer, tls_subject, tls_psk_identity, tls_psk, &del_hostgroupids); src/zabbix_server/lld/lld_host.c:4086: error: UNINITIALIZED_VALUE The value read from proxy_hostid was never initialized. 4084. inventory_mode_proto = (char)atoi(row[5]); 4085. 4086. > lld_hosts_get(parent_hostid, &hosts, proxy_hostid, ipmi_authtype, ipmi_privilege, ipmi_username, 4087. ipmi_password, tls_connect, tls_accept, tls_issuer, tls_subject, 4088. tls_psk_identity, tls_psk); src/zabbix_server/lld/lld_host.c:4135: error: UNINITIALIZED_VALUE The value read from proxy_hostid was never initialized. 4133. 4134. lld_groups_save(&groups, &group_prototypes); 4135. > lld_hosts_save(parent_hostid, &hosts, host_proto, proxy_hostid, ipmi_authtype, ipmi_privilege, 4136. ipmi_username, ipmi_password, tls_connect, tls_accept, 4137. tls_issuer, tls_subject, tls_psk_identity, tls_psk, &del_hostgroupids); src/zabbix_server/lld/lld_host.c:4086: error: UNINITIALIZED_VALUE The value read from tls_accept was never initialized. 4084. inventory_mode_proto = (char)atoi(row[5]); 4085. 4086. > lld_hosts_get(parent_hostid, &hosts, proxy_hostid, ipmi_authtype, ipmi_privilege, ipmi_username, 4087. ipmi_password, tls_connect, tls_accept, tls_issuer, tls_subject, 4088. tls_psk_identity, tls_psk); src/zabbix_server/lld/lld_host.c:4135: error: UNINITIALIZED_VALUE The value read from tls_accept was never initialized. 4133. 4134. lld_groups_save(&groups, &group_prototypes); 4135. > lld_hosts_save(parent_hostid, &hosts, host_proto, proxy_hostid, ipmi_authtype, ipmi_privilege, 4136. ipmi_username, ipmi_password, tls_connect, tls_accept, 4137. tls_issuer, tls_subject, tls_psk_identity, tls_psk, &del_hostgroupids); src/zabbix_server/lld/lld_host.c:4086: error: UNINITIALIZED_VALUE The value read from tls_connect was never initialized. 4084. inventory_mode_proto = (char)atoi(row[5]); 4085. 4086. > lld_hosts_get(parent_hostid, &hosts, proxy_hostid, ipmi_authtype, ipmi_privilege, ipmi_username, 4087. ipmi_password, tls_connect, tls_accept, tls_issuer, tls_subject, 4088. tls_psk_identity, tls_psk); src/zabbix_server/lld/lld_host.c:4135: error: UNINITIALIZED_VALUE The value read from tls_connect was never initialized. 4133. 4134. lld_groups_save(&groups, &group_prototypes); 4135. > lld_hosts_save(parent_hostid, &hosts, host_proto, proxy_hostid, ipmi_authtype, ipmi_privilege, 4136. ipmi_username, ipmi_password, tls_connect, tls_accept, 4137. tls_issuer, tls_subject, tls_psk_identity, tls_psk, &del_hostgroupids); src/zabbix_server/lld/lld_host.c:4179: error: UNINITIALIZED_VALUE The value read from tls_issuer was never initialized. 4177. zbx_free(tls_psk_identity); 4178. zbx_free(tls_subject); 4179. > zbx_free(tls_issuer); 4180. zbx_free(ipmi_password); 4181. zbx_free(ipmi_username); src/zabbix_server/lld/lld_host.c:4176: error: UNINITIALIZED_VALUE The value read from tls_psk was never initialized. 4174. zbx_vector_ptr_destroy(&hosts); 4175. 4176. > zbx_free(tls_psk); 4177. zbx_free(tls_psk_identity); 4178. zbx_free(tls_subject); src/zabbix_server/lld/lld_host.c:4177: error: UNINITIALIZED_VALUE The value read from tls_psk_identity was never initialized. 4175. 4176. zbx_free(tls_psk); 4177. > zbx_free(tls_psk_identity); 4178. zbx_free(tls_subject); 4179. zbx_free(tls_issuer); src/zabbix_server/lld/lld_host.c:4178: error: UNINITIALIZED_VALUE The value read from tls_subject was never initialized. 4176. zbx_free(tls_psk); 4177. zbx_free(tls_psk_identity); 4178. > zbx_free(tls_subject); 4179. zbx_free(tls_issuer); 4180. zbx_free(ipmi_password); src/zabbix_server/lld/lld_item.c:4252: error: UNINITIALIZED_VALUE The value read from itemappid was never initialized. 4250. itemid = item_application->item_ref.item->itemid; 4251. 4252. > item_application->itemappid = itemappid++; 4253. zbx_db_insert_add_values(&db_insert, item_application->itemappid, applicationid, itemid); 4254. } src/libs/zbxdbcache/dbcache.c:4398: error: NULL_DEREFERENCE pointer `cache` last assigned on line 4397 could be null and is dereferenced by call to `memset()` at line 4398, column 2. 4396. 4397. cache = (ZBX_DC_CACHE *)__hc_index_mem_malloc_func(NULL, sizeof(ZBX_DC_CACHE)); 4398. > memset(cache, 0, sizeof(ZBX_DC_CACHE)); 4399. 4400. ids = (ZBX_DC_IDS *)__hc_index_mem_malloc_func(NULL, sizeof(ZBX_DC_IDS)); src/libs/zbxcommon/str.c:4735: error: DEAD_STORE The value written to &pout (type char*) is never used. 4733. *pout++ = *pin; 4734. } 4735. > *pout++ ='\0'; 4736. } 4737. else src/zabbix_server/vmware/vmware.c:4854: error: NULL_DEREFERENCE pointer `counter` last assigned on line 4853 could be null and is dereferenced at line 4854, column 2. 4852. 4853. counter = (zbx_vmware_perf_counter_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_perf_counter_t)); 4854. > counter->counterid = counterid; 4855. counter->state = ZBX_VMWARE_COUNTER_NEW; 4856. src/libs/zbxdbhigh/host.c:5526: error: UNINITIALIZED_VALUE The value read from httpstep was never initialized. 5524. } 5525. 5526. > if (NULL == httpstep || httpstep->httpstepid != httpstepid) 5527. { 5528. if (FAIL == (i = zbx_vector_ptr_bsearch(&httptest->httpsteps, &httpstepid, src/zabbix_server/vmware/vmware.c:6132: error: NULL_DEREFERENCE pointer `vmware` last assigned on line 6131 could be null and is dereferenced by call to `memset()` at line 6132, column 2. 6130. 6131. vmware = (zbx_vmware_t *)__vm_mem_malloc_func(NULL, sizeof(zbx_vmware_t)); 6132. > memset(vmware, 0, sizeof(zbx_vmware_t)); 6133. 6134. VMWARE_VECTOR_CREATE(&vmware->services, ptr); src/libs/zbxserver/expression.c:6312: error: UNINITIALIZED_VALUE The value read from key_type was never initialized. 6310. } 6311. 6312. > ret = replace_key_params_dyn(data, key_type, replace_key_param_cb, &replace_key_param_data, error, maxerrlen); 6313. 6314. zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%s data:'%s'", __func__, zbx_result_string(ret), *data); src/libs/zbxdbcache/dbconfig.c:6574: error: NULL_DEREFERENCE pointer `s1` last assigned on line 6571 could be null and is dereferenced at line 6574, column 2. 6572. s2 = (ZBX_DC_SNMPITEM *)zbx_hashset_search(&config->snmpitems, &i2->itemid); 6573. 6574. > ZBX_RETURN_IF_NOT_EQUAL(s1->snmp_oid_type, s2->snmp_oid_type); 6575. 6576. return 0; src/libs/zbxdbcache/dbconfig.c:6631: error: NULL_DEREFERENCE pointer `j1` last assigned on line 6628 could be null and is dereferenced at line 6631, column 2. 6629. j2 = (ZBX_DC_JMXITEM *)zbx_hashset_search(&config->jmxitems, &i2->itemid); 6630. 6631. > ZBX_RETURN_IF_NOT_EQUAL(j1->username, j2->username); 6632. ZBX_RETURN_IF_NOT_EQUAL(j1->password, j2->password); 6633. ZBX_RETURN_IF_NOT_EQUAL(j1->jmx_endpoint, j2->jmx_endpoint); src/libs/zbxdbcache/dbconfig.c:7175: error: UNINITIALIZED_VALUE The value read from attr.psk_identity_len was never initialized. 7173. if (NULL != dc_host->tls_dc_psk) 7174. { 7175. > if (strlen(dc_host->tls_dc_psk->tls_psk_identity) != attr.psk_identity_len || 7176. 0 != memcmp(dc_host->tls_dc_psk->tls_psk_identity, attr.psk_identity, 7177. attr.psk_identity_len)) src/libs/zbxdbcache/dbconfig.c:7176: error: UNINITIALIZED_VALUE The value read from attr.psk_identity_len was never initialized. 7174. { 7175. if (strlen(dc_host->tls_dc_psk->tls_psk_identity) != attr.psk_identity_len || 7176. > 0 != memcmp(dc_host->tls_dc_psk->tls_psk_identity, attr.psk_identity, 7177. attr.psk_identity_len)) 7178. { src/libs/zbxembed/duktape.c:11759: error: DEAD_STORE The value written to &msg (type char const *) is never used. 11757. DUK_UNREF(msg); 11758. 11759. > msg = msg ? msg : "NULL"; 11760. 11761. #if defined(DUK_USE_FATAL_HANDLER) src/libs/zbxdbcache/dbconfig.c:12265: error: DEAD_STORE The value written to &last_type (type int) is never used. 12263. const char *op = NULL; 12264. size_t formula_alloc = 0, formula_offset = 0; 12265. > int i, last_type = -1, last_op = ZBX_OPERATION_TYPE_UNKNOWN; 12266. const zbx_dc_corr_condition_t *dc_condition; 12267. zbx_uint64_t last_id; src/libs/zbxembed/duktape.c:12820: error: NULL_DEREFERENCE pointer `h_input` last assigned on line 12816 could be null and is dereferenced at line 12820, column 2. 12818. 12819. bw = &bw_alloc; 12820. > DUK_BW_INIT_PUSHBUF(thr, bw, DUK_HSTRING_GET_BYTELEN(h_input)); 12821. 12822. /* [ ... input buffer ] */ src/libs/zbxembed/duktape.c:16708: error: NULL_DEREFERENCE pointer `h_key` last assigned on line 16706 could be null and is dereferenced by call to `duk_hobject_find_entry_tval_ptr()` at line 16708, column 11. 16706. h_key = duk_require_hstring(thr, -1); 16707. 16708. > tv_val = duk_hobject_find_entry_tval_ptr(thr->heap, h_obj, h_key); 16709. if (tv_val == NULL) { 16710. return 0; src/libs/zbxembed/duktape.c:17490: error: NULL_DEREFERENCE pointer `obj` last assigned on line 17486 could be null and is dereferenced at line 17490, column 10. 17488. 17489. /* XXX: shared helper for duk_push_hobject_or_undefined()? */ 17490. > proto = DUK_HOBJECT_GET_PROTOTYPE(thr->heap, obj); 17491. if (proto) { 17492. duk_push_hobject(thr, proto); src/libs/zbxembed/duktape.c:17518: error: NULL_DEREFERENCE pointer `obj` last assigned on line 17504 could be null and is dereferenced by call to `duk_hobject_set_prototype_updref()` at line 17518, column 2. 17516. #endif 17517. 17518. > DUK_HOBJECT_SET_PROTOTYPE_UPDREF(thr, obj, proto); 17519. 17520. duk_pop(thr); src/libs/zbxembed/duktape.c:17538: error: NULL_DEREFERENCE pointer `obj` last assigned on line 17528 could be null and is dereferenced by call to `duk_hobject_set_prototype_updref()` at line 17538, column 2. 17536. #endif 17537. 17538. > DUK_HOBJECT_SET_PROTOTYPE_UPDREF(thr, obj, NULL); 17539. } 17540. src/libs/zbxembed/duktape.c:17550: error: NULL_DEREFERENCE pointer `obj` last assigned on line 17547 could be null and is dereferenced at line 17550, column 10. 17548. DUK_ASSERT(obj != NULL); 17549. 17550. > proto = DUK_HOBJECT_GET_PROTOTYPE(thr->heap, obj); 17551. return (proto == NULL); 17552. } src/libs/zbxembed/duktape.c:19330: error: NULL_DEREFERENCE pointer `h` last assigned on line 19327 could be null and is dereferenced at line 19330, column 14. 19328. DUK_ASSERT(h != NULL); 19329. if (out_len) { 19330. > *out_len = DUK_HSTRING_GET_BYTELEN(h); 19331. } 19332. return (const char *) DUK_HSTRING_GET_DATA(h); src/libs/zbxembed/duktape.c:22461: error: DEAD_STORE The value written to &sz (type unsigned long) is never used. 22459. DUK_EXTERNAL const char *duk_push_vsprintf(duk_hthread *thr, const char *fmt, va_list ap) { 22460. duk_uint8_t stack_buf[DUK_PUSH_SPRINTF_INITIAL_SIZE]; 22461. > duk_size_t sz = DUK_PUSH_SPRINTF_INITIAL_SIZE; 22462. duk_bool_t pushed_buf = 0; 22463. void *buf; src/libs/zbxembed/duktape.c:22518: error: UNINITIALIZED_VALUE The value read from len was never initialized. 22516. * usually larger than 'len'; 'buf' is also usually a stack buffer. 22517. */ 22518. > res = duk_push_lstring(thr, (const char *) buf, (duk_size_t) len); /* [ buf? res ] */ 22519. if (pushed_buf) { 22520. duk_remove_m2(thr); src/libs/zbxembed/duktape.c:24766: error: NULL_DEREFERENCE pointer `h_input` last assigned on line 24762 could be null and is dereferenced at line 24766, column 20. 24764. 24765. p_start = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_input); 24766. > p_end = p_start + DUK_HSTRING_GET_BYTELEN(h_input); 24767. p = p_start; 24768. src/libs/zbxembed/duktape.c:24793: error: NULL_DEREFERENCE pointer `h_input` last assigned on line 24789 could be null and is dereferenced at line 24793, column 2. 24791. 24792. bw = &bw_alloc; 24793. > DUK_BW_INIT_PUSHBUF(thr, bw, DUK_HSTRING_GET_BYTELEN(h_input)); /* Reasonable output estimate. */ 24794. 24795. p_start = (const duk_uint8_t *) DUK_HSTRING_GET_DATA(h_input); src/libs/zbxembed/duktape.c:24831: error: NULL_DEREFERENCE pointer `h` last assigned on line 24828 could be null and is dereferenced by call to `duk_hstring_get_charlen()` at line 24831, column 12. 24829. DUK_ASSERT(h != NULL); 24830. 24831. > charlen = DUK_HSTRING_GET_CHARLEN(h); 24832. if (end_offset >= charlen) { 24833. end_offset = charlen; src/libs/zbxembed/duktape.c:24879: error: NULL_DEREFERENCE pointer `h` last assigned on line 24875 could be null and is dereferenced at line 24879, column 20. 24877. 24878. p_start = DUK_HSTRING_GET_DATA(h); 24879. > p_end = p_start + DUK_HSTRING_GET_BYTELEN(h); 24880. 24881. p = p_start; src/libs/zbxembed/duktape.c:24955: error: NULL_DEREFERENCE pointer `h` last assigned on line 24951 could be null and is dereferenced by call to `duk_hstring_get_charlen()` at line 24955, column 21. 24953. 24954. DUK_ASSERT_DISABLE(char_offset >= 0); /* Always true, arg is unsigned. */ 24955. > if (char_offset >= DUK_HSTRING_GET_CHARLEN(h)) { 24956. return 0; 24957. } src/libs/zbxembed/duktape.c:26034: error: UNINITIALIZED_VALUE The value read from have_delcount was never initialized. 26032. duk_int_t i, n; 26033. 26034. > DUK_UNREF(have_delcount); 26035. 26036. nargs = duk_get_top(thr); src/libs/zbxembed/duktape.c:28759: error: NULL_DEREFERENCE pointer `h_this` last assigned on line 28747 could be null and is dereferenced at line 28759, column 49. 28757. 28758. duk__clamp_startend_negidx_shifted(thr, 28759. > (duk_int_t) h_this->length, 28760. (duk_uint8_t) h_this->shift, 28761. 0 /*idx_start*/, src/libs/zbxembed/duktape.c:28946: error: NULL_DEREFERENCE pointer `h_arg` last assigned on line 28945 could be null and is dereferenced at line 28946, column 6. 28944. /* Node.js accepts only actual Arrays. */ 28945. h_arg = duk_require_hobject(thr, 0); 28946. > if (DUK_HOBJECT_GET_CLASS_NUMBER(h_arg) != DUK_HOBJECT_CLASS_ARRAY) { 28947. DUK_DCERROR_TYPE_INVALID_ARGS(thr); 28948. } src/libs/zbxembed/duktape.c:29621: error: NULL_DEREFERENCE pointer `h_bufobj` last assigned on line 29619 could be null and is dereferenced at line 29621, column 6. 29619. h_bufobj = (duk_hbufobj *) duk__getrequire_bufobj_this(thr, DUK__BUFOBJ_FLAG_THROW /*flags*/); 29620. DUK_ASSERT(h_bufobj != NULL); 29621. > if (DUK_HEAPHDR_IS_BUFFER((duk_heaphdr *) h_bufobj)) { 29622. DUK_DD(DUK_DDPRINT("autospawn ArrayBuffer for plain buffer")); 29623. (void) duk__autospawn_arraybuffer(thr, (duk_hbuffer *) h_bufobj); src/libs/zbxembed/duktape.c:29669: error: NULL_DEREFERENCE pointer `h_bufobj` last assigned on line 29667 could be null and is dereferenced at line 29669, column 6. 29667. h_bufobj = (duk_hbufobj *) duk__getrequire_bufobj_this(thr, DUK__BUFOBJ_FLAG_THROW /*flags*/); 29668. DUK_ASSERT(h_bufobj != NULL); 29669. > if (DUK_HEAPHDR_IS_BUFFER((duk_heaphdr *) h_bufobj)) { 29670. duk_push_uint(thr, 0); 29671. } else { src/libs/zbxembed/duktape.c:29685: error: NULL_DEREFERENCE pointer `h_bufobj` last assigned on line 29683 could be null and is dereferenced at line 29685, column 6. 29683. h_bufobj = (duk_hbufobj *) duk__getrequire_bufobj_this(thr, DUK__BUFOBJ_FLAG_THROW /*flags*/); 29684. DUK_ASSERT(h_bufobj != NULL); 29685. > if (DUK_HEAPHDR_IS_BUFFER((duk_heaphdr *) h_bufobj)) { 29686. duk_hbuffer *h_buf; 29687. src/libs/zbxembed/duktape.c:30772: error: UNINITIALIZED_VALUE The value read from rc was never initialized. 30770. duk_uint8_t buf[DUK_BI_DATE_ISO8601_BUFSIZE]; 30771. 30772. > DUK_UNREF(rc); /* unreferenced with some options */ 30773. 30774. d = duk__push_this_get_timeval_tzoffset(thr, flags, &tzoffset); src/libs/zbxembed/duktape.c:34043: error: DEAD_STORE The value written to &this_to_global (type unsigned int) is never used. 34041. duk_hobject *outer_lex_env; 34042. duk_hobject *outer_var_env; 34043. > duk_bool_t this_to_global = 1; 34044. duk_small_uint_t comp_flags; 34045. duk_int_t level = -2; src/libs/zbxembed/duktape.c:38713: error: MEMORY_LEAK `return` is not reachable after line 38713, column 2. 38711. */ 38712. duk_push_boolean(thr, duk_hobject_prototype_chain_contains(thr, DUK_HOBJECT_GET_PROTOTYPE(thr->heap, h_v), h_obj, 0 /*ignore_loop*/)); 38713. > return 1; 38714. } 38715. #endif /* DUK_USE_OBJECT_BUILTIN */ src/libs/zbxembed/duktape.c:39712: error: DEAD_STORE The value written to &p (type unsigned char*) is never used. 39710. /* .unicode: to be added */ 39711. /* .sticky: to be added */ 39712. > *p++ = DUK_ASC_NUL; 39713. DUK_ASSERT((duk_size_t) (p - buf) <= sizeof(buf)); 39714. src/libs/zbxembed/duktape.c:41515: error: NULL_DEREFERENCE pointer `h` last assigned on line 41504 could be null and is dereferenced at line 41515, column 63. 41513. if (p[0] == 0x80) { 41514. /* Global symbol, return its key (bytes just after the initial byte). */ 41515. > duk_push_lstring(thr, (const char *) (p + 1), (duk_size_t) (DUK_HSTRING_GET_BYTELEN(h) - 1)); 41516. return 1; 41517. } else if (p[0] == 0x81 || p[0] == 0x82 || p[0] == 0xff) { src/libs/zbxembed/duktape.c:46495: error: MEMORY_LEAK `obj` is not reachable after line 46495, column 6. 46493. return; 46494. } 46495. > if (DUK_HOBJECT_HAS_EXTENSIBLE(obj)) { 46496. DUK_DDD(DUK_DDDPRINT("error meets criteria, built-in augment")); 46497. duk__err_augment_builtin_create(thr, thr_callstack, c_filename, c_line, obj, flags); src/libs/zbxembed/duktape.c:57216: error: DEAD_STORE The value written to &arr_idx (type unsigned int) is never used. 57214. duk_hobject *curr = NULL; 57215. duk_hstring *key = NULL; 57216. > duk_uint32_t arr_idx = DUK__NO_ARRAY_INDEX; 57217. duk_propdesc desc; 57218. duk_uint_t sanity; src/libs/zbxembed/duktape.c:57768: error: UNINITIALIZED_VALUE The value read from arr_idx was never initialized. 57766. DUK_ASSERT(key != NULL); 57767. DUK_ASSERT(obj != NULL); 57768. > DUK_UNREF(arr_idx); 57769. 57770. #if defined(DUK_USE_ES6_PROXY) src/libs/zbxembed/duktape.c:57792: error: UNINITIALIZED_VALUE The value read from arr_idx was never initialized. 57790. */ 57791. 57792. > if (duk__get_own_propdesc_raw(thr, h_target, key, arr_idx, &desc, 0 /*flags*/)) { /* don't push value */ 57793. DUK_DDD(DUK_DDDPRINT("proxy 'has': target has matching property %!O, check for " 57794. "conflicting property; desc.flags=0x%08lx, " src/libs/zbxembed/duktape.c:59231: error: DEAD_STORE The value written to &arr_idx (type unsigned int) is never used. 59229. #endif 59230. duk_int_t entry_top; 59231. > duk_uint32_t arr_idx = DUK__NO_ARRAY_INDEX; 59232. duk_bool_t rc; 59233. src/libs/zbxembed/duktape.c:59313: error: DEAD_STORE The value written to &arr_idx (type unsigned int) is never used. 59311. #endif /* DUK_USE_ES6_PROXY */ 59312. 59313. > arr_idx = duk__to_property_key(thr, -1, &key); 59314. DUK_ASSERT(key != NULL); 59315. src/libs/zbxembed/duktape.c:59364: error: DEAD_STORE The value written to &arr_idx (type unsigned int) is never used. 59362. */ 59363. 59364. > arr_idx = duk__to_property_key(thr, -1, &key); 59365. DUK_ASSERT(key != NULL); 59366. DUK_UNREF(key); src/libs/zbxembed/duktape.c:61424: error: DEAD_STORE The value written to &len (type int) is never used. 61422. for (i = 0; i < DUK_NUM_ALL_BUILTINS; i++) { 61423. duk_small_uint_t class_num; 61424. > duk_small_int_t len = -1; /* must be signed */ 61425. 61426. class_num = (duk_small_uint_t) duk_bd_decode_varuint(bd); src/libs/zbxembed/duktape.c:62653: error: UNINITIALIZED_VALUE The value read from cx was never initialized. 62651. duk_small_int_t cx, cy, sx; 62652. 62653. > DUK_UNREF(cx); 62654. DUK_UNREF(sx); 62655. cy = (duk_small_int_t) DUK_FPCLASSIFY(y); src/libs/zbxembed/duktape.c:62654: error: UNINITIALIZED_VALUE The value read from sx was never initialized. 62652. 62653. DUK_UNREF(cx); 62654. > DUK_UNREF(sx); 62655. cy = (duk_small_int_t) DUK_FPCLASSIFY(y); 62656. src/libs/zbxembed/duktape.c:63509: error: DEAD_STORE The value written to &top (type int) is never used. 63507. *call_flags |= DUK_CALL_FLAG_CONSTRUCT; 63508. duk_remove_n_unsafe(thr, idx_func, 2); 63509. > top = duk_get_top(thr); 63510. if (!duk_is_constructable(thr, idx_func)) { 63511. /* Target constructability must be checked before src/libs/zbxembed/duktape.c:64057: error: UNINITIALIZED_VALUE The value read from func was never initialized. 64055. #endif 64056. 64057. > return func; 64058. 64059. not_callable: src/libs/zbxembed/duktape.c:69415: error: UNINITIALIZED_VALUE The value read from args was never initialized. 69413. reg_res = DUK__ALLOCTEMP(comp_ctx); 69414. } 69415. > duk__emit_a_bc(comp_ctx, 69416. args, 69417. reg_res, src/libs/zbxembed/duktape.c:70016: error: UNINITIALIZED_VALUE The value read from args was never initialized. 70014. 70015. res->t = DUK_IVAL_ARITH; 70016. > res->op = (args >> 8) & 0xff; 70017. 70018. res->x2.t = res->x1.t; src/libs/zbxembed/duktape.c:71525: error: UNINITIALIZED_VALUE The value read from label_catch_depth was never initialized. 71523. */ 71524. 71525. > if (label_catch_depth == comp_ctx->curr_func.catch_depth && 71526. label_is_closest) { 71527. DUK_DDD(DUK_DDDPRINT("break/continue: is_break=%ld, label_id=%ld, label_is_closest=%ld, " src/libs/zbxembed/duktape.c:71541: error: UNINITIALIZED_VALUE The value read from label_id was never initialized. 71539. (long) label_catch_depth, (long) comp_ctx->curr_func.catch_depth)); 71540. 71541. > duk__emit_bc(comp_ctx, 71542. is_break ? DUK_OP_BREAK : DUK_OP_CONTINUE, 71543. (duk_regconst_t) label_id); src/libs/zbxembed/duktape.c:71526: error: UNINITIALIZED_VALUE The value read from label_is_closest was never initialized. 71524. 71525. if (label_catch_depth == comp_ctx->curr_func.catch_depth && 71526. > label_is_closest) { 71527. DUK_DDD(DUK_DDDPRINT("break/continue: is_break=%ld, label_id=%ld, label_is_closest=%ld, " 71528. "label_catch_depth=%ld, catch_depth=%ld " src/libs/zbxembed/duktape.c:71573: error: UNINITIALIZED_VALUE The value read from pc_after_expr was never initialized. 71571. 71572. DUK_UNREF(pc_before_expr); 71573. > DUK_UNREF(pc_after_expr); 71574. 71575. pc_before_expr = duk__get_current_pc(comp_ctx); src/libs/zbxembed/duktape.c:71572: error: UNINITIALIZED_VALUE The value read from pc_before_expr was never initialized. 71570. DUK_DDD(DUK_DDDPRINT("return with a value")); 71571. 71572. > DUK_UNREF(pc_before_expr); 71573. DUK_UNREF(pc_after_expr); 71574. src/libs/zbxembed/duktape.c:71674: error: DEAD_STORE The value written to &pc_ldconst (type int) is never used. 71672. duk_regconst_t rc_varname = 0; 71673. duk_small_uint_t trycatch_flags = 0; 71674. > duk_int_t pc_ldconst = -1; 71675. duk_int_t pc_trycatch = -1; 71676. duk_int_t pc_catch = -1; src/libs/zbxembed/duktape.c:71675: error: DEAD_STORE The value written to &pc_trycatch (type int) is never used. 71673. duk_small_uint_t trycatch_flags = 0; 71674. duk_int_t pc_ldconst = -1; 71675. > duk_int_t pc_trycatch = -1; 71676. duk_int_t pc_catch = -1; 71677. duk_int_t pc_finally = -1; src/libs/zbxembed/duktape.c:73451: error: UNINITIALIZED_VALUE The value read from old_func.fnum_next was never initialized. 73449. /* XXX: append primitive */ 73450. DUK_ASSERT(duk_get_length(thr, old_func.funcs_idx) == (duk_size_t) (old_func.fnum_next * 3)); 73451. > fnum = old_func.fnum_next++; 73452. 73453. if (fnum > DUK__MAX_FUNCS) { src/libs/zbxembed/duktape.c:73459: error: UNINITIALIZED_VALUE The value read from old_func.funcs_idx was never initialized. 73457. 73458. /* array writes autoincrement length */ 73459. > (void) duk_put_prop_index(thr, old_func.funcs_idx, (duk_uarridx_t) (fnum * 3)); 73460. duk_push_size_t(thr, comp_ctx->prev_token.start_offset); 73461. (void) duk_put_prop_index(thr, old_func.funcs_idx, (duk_uarridx_t) (fnum * 3 + 1)); src/libs/zbxembed/duktape.c:73461: error: UNINITIALIZED_VALUE The value read from old_func.funcs_idx was never initialized. 73459. (void) duk_put_prop_index(thr, old_func.funcs_idx, (duk_uarridx_t) (fnum * 3)); 73460. duk_push_size_t(thr, comp_ctx->prev_token.start_offset); 73461. > (void) duk_put_prop_index(thr, old_func.funcs_idx, (duk_uarridx_t) (fnum * 3 + 1)); 73462. duk_push_int(thr, comp_ctx->prev_token.start_line); 73463. (void) duk_put_prop_index(thr, old_func.funcs_idx, (duk_uarridx_t) (fnum * 3 + 2)); src/libs/zbxembed/duktape.c:73463: error: UNINITIALIZED_VALUE The value read from old_func.funcs_idx was never initialized. 73461. (void) duk_put_prop_index(thr, old_func.funcs_idx, (duk_uarridx_t) (fnum * 3 + 1)); 73462. duk_push_int(thr, comp_ctx->prev_token.start_line); 73463. > (void) duk_put_prop_index(thr, old_func.funcs_idx, (duk_uarridx_t) (fnum * 3 + 2)); 73464. 73465. /* src/libs/zbxembed/duktape.c:73418: error: UNINITIALIZED_VALUE The value read from old_func.is_strict was never initialized. 73416. 73417. /* inherit initial strictness from parent */ 73418. > comp_ctx->curr_func.is_strict = old_func.is_strict; 73419. 73420. /* XXX: It might be better to just store the flags into the curr_func src/libs/zbxembed/duktape.c:75335: error: DEAD_STORE The value written to &tv1 (type duk_tval_struct*) is never used. 75333. DUK_ASSERT(entry_act != NULL); 75334. DUK_ASSERT(thr->valstack_top - 1 >= thr->valstack_bottom); 75335. > tv1 = thr->valstack_top - 1; 75336. DUK_TVAL_CHKFAST_INPLACE_FAST(tv1); /* fastint downgrade check for return values */ 75337. src/libs/zbxembed/duktape.c:80112: error: DEAD_STORE The value written to &func (type duk_hobject*) is never used. 80110. duk_push_tval(thr, &((duk_hboundfunc *) (void *) func)->target); 80111. duk_replace(thr, -2); 80112. > func = duk_require_hobject(thr, -1); /* lightfunc throws */ 80113. 80114. /* Rely on Function.prototype.bind() never creating bound src/libs/zbxembed/duktape.c:80098: error: NULL_DEREFERENCE pointer `func` last assigned on line 80069 could be null and is dereferenced at line 80098, column 7. 80096. */ 80097. 80098. > if (!DUK_HOBJECT_IS_CALLABLE(func)) { 80099. /* 80100. * Note: of native ECMAScript objects, only Function instances src/libs/zbxembed/duktape.c:80633: error: UNINITIALIZED_VALUE The value read from len_value was never initialized. 80631. DUK_ASSERT(outer_var_env != NULL); 80632. DUK_ASSERT(outer_lex_env != NULL); 80633. > DUK_UNREF(len_value); 80634. 80635. DUK_STATS_INC(thr->heap, stats_envrec_pushclosure); Summary of the reports UNINITIALIZED_VALUE: 255 NULL_DEREFERENCE: 66 DEAD_STORE: 65 MEMORY_LEAK: 10 USE_AFTER_FREE: 6