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

compilation warning in setproctitle.c regarding empty_str

    Details

      Description

      The following warning is generated during compilation by clang 3.5.0:

      setproctitle.c:40:26: warning: expression which evaluates to zero treated as a null pointer constant of type
            'char *' [-Wnon-literal-null-conversion]
      static char     *empty_str = '\0';
                                   ^~~~
      1 warning generated.
      

      This is clearly a bug, however, it is unclear what was intended. The variable name suggests it should have been:

      static char     *empty_str = "";
      

      However, in practice it works like the following:

      static char     *empty_str = NULL;
      

      It should be investigated what was meant here.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              asaveljevs Aleksandrs Saveljevs
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: