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

zabbix 4.0.11 has compiler warning for src/zabbix_agentd/active.c

XMLWordPrintable

    • Sprint 56 (Sep 2019), Sprint 57 (Oct 2019)
    • 0.25

      src/zabbix_agentd/active.c in Zabbix 4.0.11 has a compiler warning by following.

      $ LANG=C make
      cc -DHAVE_CONFIG_H -I. -I../../include    -DZABBIX_DAEMON -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -Iyes/include -MT libzbxagent_a-active.o -MD -MP -MF .deps/libzbxagent_a-active.Tpo -c -o libzbxagent_a-active.o `test -f 'active.c' || echo './'`active.c
      active.c: In function 'active_checks_thread':
      active.c:1428:24: warning: 'lastlogsize_orig' may be used uninitialized in this function [-Wmaybe-uninitialized]
          metric->lastlogsize = lastlogsize_orig;
                              ^
      active.c:1236:16: note: 'lastlogsize_orig' was declared here
        zbx_uint64_t  lastlogsize_orig;
                      ^
      active.c:1430:20: warning: 'big_rec_orig' may be used uninitialized in this function [-Wmaybe-uninitialized]
          metric->big_rec = big_rec_orig;
                          ^
      active.c:1235:17: note: 'big_rec_orig' was declared here
           mtime_orig, big_rec_orig, logfiles_num_new = 0, jumped = 0, rotation_type;
                       ^
      active.c:1429:18: warning: 'mtime_orig' may be used uninitialized in this function [-Wmaybe-uninitialized]
          metric->mtime =  mtime_orig;
                        ^
      active.c:1235:5: note: 'mtime_orig' was declared here
           mtime_orig, big_rec_orig, logfiles_num_new = 0, jumped = 0, rotation_type;
           ^
      active.c:1386:16: warning: 's_count_orig' may be used uninitialized in this function [-Wmaybe-uninitialized]
          match_count = s_count_orig - s_count;
                      ^
      active.c:1234:57: note: 's_count_orig' was declared here
        int   max_lines_per_sec, ret = FAIL, s_count, p_count, s_count_orig, is_count_item,
                                                               ^
      

      attached fix patch

            arimdjonoks Artjoms Rimdjonoks
            daiki.matsuda@miraclelinux.com MATSUDA Daiki
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: