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

Remove signed and unsigned comparison warnings

XMLWordPrintable

      Following from ZBX-11105 - it would be good to get rid of signed and unsigned comparison warnings:

      Making all in linux
      hardware.c: In function ‘print_freq’:
      hardware.c:266:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
        if (HW_CPU_SHOW_MAXFREQ == filter && FAIL != maxfreq)
                                                  ^
      hardware.c:273:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
        else if (HW_CPU_SHOW_CURFREQ == filter && FAIL != curfreq)
                                                       ^
      hardware.c:282:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (FAIL != curfreq)
                  ^
      hardware.c:285:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (FAIL != maxfreq)
                  ^
      hardware.c: In function ‘SYSTEM_HW_CPU’:
      hardware.c:361:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
            FAIL != (maxfreq = get_cpu_max_freq(cur_cpu)))
                 ^
      proc.c: In function ‘proc_create’:
      proc.c:1198:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (i = 0; i < cmdline_nbytes - 1; i++)
                       ^
      swap.c: In function ‘get_swap_dev_stat’:
      swap.c:140:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (rdev_major == major(dev_st.st_rdev) && rdev_minor == minor(dev_st.st_rdev))
                        ^
      swap.c:140:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (rdev_major == major(dev_st.st_rdev) && rdev_minor == minor(dev_st.st_rdev))
      ...                                                         ^
      Making all in zbxjson
      json.c: In function ‘zbx_json_copy_string’:
      json.c:656:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (out - start == size)
                         ^
      

            Unassigned Unassigned
            wiper Andris Zeila
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: