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

Compiler warnings in 2.4.5

XMLWordPrintable

      In file included from discoverer.c:20:0:
      discoverer.c: In function 'discoverer_thread':
      ../../../include/common.h:885:63: warning: array subscript is above array bounds [-Warray-bounds]
       # define zbx_snprintf(str, count, fmt, ...) __zbx_zbx_snprintf(str, count, ZBX_CONST_STRING(fmt), ##__VA_ARGS__)
                                                                     ^
      discoverer.c:495:5: note: in expansion of macro 'zbx_snprintf'
           zbx_snprintf(ip, sizeof(ip), "%x:%x:%x:%x:%x:%x:%x:%x", ipaddress[0], ipaddress[1],
           ^
      
      snmptrapper.c: In function 'parse_traps':
      snmptrapper.c:291:12: warning: 'pzdate' may be used uninitialized in this function [-Wmaybe-uninitialized]
          *pzdate = '\0';
                  ^
      snmptrapper.c:292:12: warning: 'pzaddr' may be used uninitialized in this function [-Wmaybe-uninitialized]
          *pzaddr = '\0';
                  ^
      
      lld_host.c: In function 'lld_update_hosts':
      lld_host.c:2355:16: warning: 'interface' may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (interface->main != main)
                      ^
      lld_host.c:2315:23: note: 'interface' was declared here
        zbx_lld_interface_t *interface;
                             ^
      lld_host.c:938:16: warning: 'group' may be used uninitialized in this function [-Wmaybe-uninitialized]
          group->name = buffer;
                      ^
      lld_host.c:864:19: note: 'group' was declared here
        zbx_lld_group_t *group;
                         ^
      lld_host.c:594:23: warning: 'host' may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (0 != strcmp(host->name, buffer))
                             ^
      lld_host.c:534:18: note: 'host' was declared here
        zbx_lld_host_t *host;
                        ^
      
      lld_trigger.c: In function 'lld_update_triggers':
      lld_trigger.c:530:27: warning: 'function' may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (0 != strcmp(function->function, function_proto->function))
                                 ^
      lld_trigger.c:492:22: note: 'function' was declared here
        zbx_lld_function_t *function;
                            ^
      
      host.c: In function 'DBcopy_template_elements':
      host.c:2305:28: warning: 'application' may be used uninitialized in this function [-Wmaybe-uninitialized]
          zbx_vector_uint64_append(&application->templateids, db_applicationid);
                                  ^
      host.c:2257:21: note: 'application' was declared here
        zbx_application_t *application;
                           ^
      
      net.c: In function 'dns_query.isra.0':
      net.c:490:16: warning: 'saved_nscount' may be used uninitialized in this function [-Wmaybe-uninitialized]
         _res.nscount = saved_nscount;
      

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

              Created:
              Updated:
              Resolved: