Project

General

Profile

Actions

Bug #9031

closed

sgs/libld: comparison between pointer and zero character constant

Added by Toomas Soome almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2018-02-05
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

Issue revealed by gcc 7 build:

    ../common/map_core.c: In function 'cdir_process':
    ../common/map_core.c:1595:21: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
      assert(mf->mf_next == '\0');
                         ^
    /code/illumos-gate/proto/root_i386/usr/include/assert.h:75:28: note: in definition of macro 'assert'
     #define assert(EX) (void)((EX) || \
                                ^~
    ../common/map_core.c:1595:9: note: did you mean to dereference the pointer?
      assert(mf->mf_next == '\0');
             ^
    /code/illumos-gate/proto/root_i386/usr/include/assert.h:75:28: note: in definition of macro 'assert'
     #define assert(EX) (void)((EX) || \
                                ^~
    cc1: all warnings being treated as errors

Actions

Also available in: Atom PDF