Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-14439

zabbix 3.4.10 compile warings

XMLWordPrintable

    • Sprint 36, Sprint 37
    • 1

      Here are compile warnings which are shown during zabbix 3.4.10 compilation:

       

      ../../../../src/libs/zbxalgo/prediction.c: In function 'zbx_timeleft':
      ../../../../src/libs/zbxalgo/prediction.c:833:11: warning: 'result' may be used uninitialized in this function [-Wmaybe-uninitialized]
       *result -= now;
       ^~
      ../../../../src/libs/zbxalgo/prediction.c:1148:19: note: 'result' was declared here
       double current, result;
       ^~~~~~
      ../../../../src/libs/zbxdbupgrade/dbupgrade_3010.c: In function 'DBpatch_3010026_expression_remove_values_impl.isra.5':
      ../../../../src/libs/zbxdbupgrade/dbupgrade_3010.c:978:54: warning: 'value_token.r' may be used uninitialized in this function [-Wmaybe-uninitialized]
       DBpatch_3010026_expression_move_location(&token, -(cut_loc.r - cut_loc.l + 1));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbupgrade/dbupgrade_3010.c:991:54: warning: 'value_token.l' may be used uninitialized in this function [-Wmaybe-uninitialized]
       DBpatch_3010026_expression_move_location(&token, -(cut_loc.r - cut_loc.l + 1));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbupgrade/dbupgrade_3010.c:978:54: warning: 'op_token.l' may be used uninitialized in this function [-Wmaybe-uninitialized]
       DBpatch_3010026_expression_move_location(&token, -(cut_loc.r - cut_loc.l + 1));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbhigh/db.c: In function 'DBregister_host_flush':
      ../../../../src/libs/zbxdbhigh/db.c:1443:49: warning: 'autoreg_hostid' may be used uninitialized in this function [-Wmaybe-uninitialized]
       autoreg_host->autoreg_hostid = autoreg_hostid++;
       ~~~~~~~~~~~~~~^~
      ../../../../src/libs/zbxdbhigh/host.c: In function 'DBcopy_template_elements':
      ../../../../src/libs/zbxdbhigh/host.c:3349:80: warning: 'host_prototype' may be used uninitialized in this function [-Wmaybe-uninitialized]
       group_prototype = (zbx_group_prototype_t *)host_prototype->group_prototypes.values[i];
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
      ../../../../src/libs/zbxdbhigh/host.c:3254:24: note: 'host_prototype' was declared here
       zbx_host_prototype_t *host_prototype;
       ^~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbhigh/host.c:3216:47: warning: 'host_prototype' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if (FAIL == (i = zbx_vector_uint64_bsearch(&host_prototype->lnk_templateids, templateid,
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbhigh/host.c:3129:24: note: 'host_prototype' was declared here
       zbx_host_prototype_t *host_prototype;
       ^~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbhigh/lld_item.c: In function 'lld_items_applications_save':
      ../../../../src/libs/zbxdbhigh/lld_item.c:2474:42: warning: 'itemappid' may be used uninitialized in this function [-Wmaybe-uninitialized]
       item_application->itemappid = itemappid++;
       ~~~~~~~~~^~
      ../../../../src/libs/zbxdbhigh/lld_item.c: In function 'lld_update_items':
      ../../../../src/libs/zbxdbhigh/lld_item.c:2296:3: warning: 'application_discoveryid' may be used uninitialized in this function [-Wmaybe-uninitialized]
       zbx_db_insert_add_values(&db_insert_discovery, application->application_discoveryid,
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       application->applicationid, application->application_prototypeid,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       application_prototype->name);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbhigh/lld_item.c:2176:33: note: 'application_discoveryid' was declared here
       zbx_uint64_t applicationid, application_discoveryid;
       ^~~~~~~~~~~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbhigh/lld_item.c:2270:4: warning: 'applicationid' may be used uninitialized in this function [-Wmaybe-uninitialized]
       zbx_db_insert_add_values(&db_insert, application->applicationid, hostid, application->name,
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       ZBX_FLAG_DISCOVERY_CREATED);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbhigh/lld_item.c:2176:18: note: 'applicationid' was declared here
       zbx_uint64_t applicationid, application_discoveryid;
       ^~~~~~~~~~~~~
      ../../../../src/libs/zbxdbhigh/lld_trigger.c: In function 'lld_triggers_save.isra.18':
      ../../../../src/libs/zbxdbhigh/lld_trigger.c:2654:5: warning: 'triggertagid' may be used uninitialized in this function [-Wmaybe-uninitialized]
       zbx_db_insert_add_values(&db_insert_ttags, tag->triggertagid, trigger->triggerid,
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       tag->tag, tag->value);
       ~~~~~~~~~~~~~~~~~~~~~
      ../../../../src/libs/zbxdbhigh/lld_trigger.c: In function 'lld_update_triggers':
      ../../../../src/libs/zbxdbhigh/lld_trigger.c:1518:22: warning: 'dependency' may be used uninitialized in this function [-Wmaybe-uninitialized]
       dependency->flags = ZBX_FLAG_LLD_DEPENDENCY_DISCOVERED;
       ^
      ../../../../src/libs/zbxdbhigh/lld_trigger.c:1422:26: note: 'dependency' was declared here
       zbx_lld_dependency_t *dependency;
       ^~~~~~~~~~
      ../../../../src/libs/zbxserver/evalfunc.c: In function 'evaluate_COUNT':
      ../../../../src/libs/zbxserver/evalfunc.c:453:24: warning: 'arg2_dbl' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if (value > pattern - ZBX_DOUBLE_EPSILON)
      ../../../../src/libs/zbxserver/evalfunc.c:528:12: note: 'arg2_dbl' was declared here
       double arg2_dbl;
       ^~~~~~~~
      ../../../../src/libs/zbxserver/expression.c: In function 'substitute_simple_macros':
      ../../../../src/libs/zbxserver/expression.c:4057:31: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized]
       (*data)[token.token.r + 1] = c;
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
      ../../../../src/libs/zbxtasks/task.c: In function 'tm_save_tasks':
      ../../../../src/libs/zbxtasks/task.c:344:29: warning: 'taskid' may be used uninitialized in this function [-Wmaybe-uninitialized]
       tasks[i]->taskid = taskid++;
       ~~~~~~^~
      ../../../src/zabbix_agent/active.c: In function 'active_checks_thread':
      ../../../src/zabbix_agent/active.c:1307:20: warning: 'big_rec_orig' may be used uninitialized in this function [-Wmaybe-uninitialized]
       metric->big_rec = big_rec_orig;
       ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
      ../../../src/zabbix_agent/active.c:1102:17: note: 'big_rec_orig' was declared here
       mtime_orig, big_rec_orig, logfiles_num_new = 0, jumped = 0;
       ^~~~~~~~~~~~
      ../../../src/zabbix_agent/active.c:1306:18: warning: 'mtime_orig' may be used uninitialized in this function [-Wmaybe-uninitialized]
       metric->mtime = mtime_orig;
       ~~~~~~~~~~~~~~^~~~~~~~~~~~~
      ../../../src/zabbix_agent/active.c:1102:5: note: 'mtime_orig' was declared here
       mtime_orig, big_rec_orig, logfiles_num_new = 0, jumped = 0;
       ^~~~~~~~~~
      ../../../src/zabbix_agent/active.c:1305:24: warning: 'lastlogsize_orig' may be used uninitialized in this function [-Wmaybe-uninitialized]
       metric->lastlogsize = lastlogsize_orig;
       ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
      ../../../src/zabbix_agent/active.c:1103:16: note: 'lastlogsize_orig' was declared here
       zbx_uint64_t lastlogsize_orig;
       ^~~~~~~~~~~~~~~~
      ../../../src/zabbix_agent/active.c:1263:16: warning: 's_count_orig' may be used uninitialized in this function [-Wmaybe-uninitialized]
       match_count = s_count_orig - s_count;
       ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
      ../../../src/zabbix_agent/active.c:1101:44: note: 's_count_orig' was declared here
       int rate, ret = FAIL, s_count, p_count, s_count_orig, is_count_item, max_delay_par_nr,
       ^~~~~~~~~~~~
      ../../../../src/zabbix_server/poller/checks_simple_vmware.c: In function 'vmware_service_get_counter_value_by_id':
      ../../../../src/zabbix_server/poller/checks_simple_vmware.c:216:27: warning: 'perfvalue' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if (0 == strcmp(perfvalue->second, "-1"))
       ~~~~~~~~~^~~~~~~~

            MVekslers Michael Veksler
            kloczek Tomasz Kłoczko
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: