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

Compiler warnings in 2.5.0

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 2.5.0
    • Proxy (P), Server (S)

      Here's the list of compiler warnings I can see with GCC 5.2.1, when building from the alpha tarball:

      host.c: In function 'DBcopy_template_host_prototypes':
      host.c:3117:24: warning: 'host_prototype' may be used uninitialized in this function [-Wmaybe-uninitialized]
        zbx_host_prototype_t *host_prototype;
                              ^
      host.c:3079: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,
                                                     ^
      host.c:2992:24: note: 'host_prototype' was declared here
        zbx_host_prototype_t *host_prototype;
      
      lld_item.c: In function 'lld_update_items':
      lld_item.c:1811:42: warning: 'itemappid' may be used uninitialized in this function [-Wmaybe-uninitialized]
         item_application->itemappid = itemappid++;
                                                ^
      lld_item.c:1764:17: note: 'itemappid' was declared here
        zbx_uint64_t   itemappid, applicationid, itemid;
                       ^
      lld_item.c:1611:4: warning: 'applicationid' may be used uninitialized in this function [-Wmaybe-uninitialized]
          zbx_db_insert_add_values(&db_insert, application->applicationid, hostid, application->name,
          ^
      lld_item.c:1529:17: note: 'applicationid' was declared here
        zbx_uint64_t   applicationid, application_discoveryid;
                       ^
      lld_item.c:1637:3: warning: 'application_discoveryid' may be used uninitialized in this function [-Wmaybe-uninitialized]
         zbx_db_insert_add_values(&db_insert_discovery, application->application_discoveryid,
         ^
      lld_item.c:1529:32: note: 'application_discoveryid' was declared here
        zbx_uint64_t   applicationid, application_discoveryid;
      
      lld_trigger.c: In function 'lld_update_triggers':
      lld_trigger.c:1194:23: warning: 'dependency' may be used uninitialized in this function [-Wmaybe-uninitialized]
           dependency->flags = ZBX_FLAG_LLD_DEPENDENCY_DISCOVERED;
                             ^
      lld_trigger.c:1132:25: note: 'dependency' was declared here
        zbx_lld_dependency_t  *dependency;
      
      checks_simple_vmware.c: In function 'check_vcenter_vm_hv_name':
      checks_simple_vmware.c:1887:31: warning: 'hv' may be used uninitialized in this function [-Wmaybe-uninitialized]
         name = zbx_xml_read_value(hv->details, ZBX_XPATH_HV_CONFIG("name"));
      
      host.c: In function 'DBcopy_template_host_prototypes':
      host.c:3117:24: warning: 'host_prototype' may be used uninitialized in this function [-Wmaybe-uninitialized]
        zbx_host_prototype_t *host_prototype;
                              ^
      host.c:3079: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,
                                                     ^
      host.c:2992:24: note: 'host_prototype' was declared here
        zbx_host_prototype_t *host_prototype;
      
      lld_item.c: In function 'lld_update_items':
      lld_item.c:1811:42: warning: 'itemappid' may be used uninitialized in this function [-Wmaybe-uninitialized]
         item_application->itemappid = itemappid++;
                                                ^
      lld_item.c:1764:17: note: 'itemappid' was declared here
        zbx_uint64_t   itemappid, applicationid, itemid;
                       ^
      lld_item.c:1611:4: warning: 'applicationid' may be used uninitialized in this function [-Wmaybe-uninitialized]
          zbx_db_insert_add_values(&db_insert, application->applicationid, hostid, application->name,
          ^
      lld_item.c:1529:17: note: 'applicationid' was declared here
        zbx_uint64_t   applicationid, application_discoveryid;
                       ^
      lld_item.c:1637:3: warning: 'application_discoveryid' may be used uninitialized in this function [-Wmaybe-uninitialized]
         zbx_db_insert_add_values(&db_insert_discovery, application->application_discoveryid,
         ^
      lld_item.c:1529:32: note: 'application_discoveryid' was declared here
        zbx_uint64_t   applicationid, application_discoveryid;
      

            Unassigned Unassigned
            volter Volker Fröhlich
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: