Avoidable compiler warning in zbxprometheus.c

XMLWordPrintable

    • Sprint 53 (Jun 2019)
    • 0.125

      Steps to reproduce:

      1. Compile Zabbix server/proxy from sources

      Result:

      Making all in zbxprometheus
      zbxprometheus.c: In function ‘zbx_prometheus_pattern’:
      zbxprometheus.c:1535:34: warning: ‘label’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         *value = zbx_strdup(NULL, label->value);
                                        ^~
      zbxprometheus.c:1520:27: note: ‘label’ was declared here
         zbx_prometheus_label_t *label;
                                 ^~~~~
      

      Expected:
      No warnings that can be easily fixed. See zbxprometheus.patch.

            Assignee:
            Viktors Tjarve
            Reporter:
            Glebs Ivanovskis
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: