Project

General

Profile

Actions

Bug #9031

closed

sgs/libld: comparison between pointer and zero character constant

Added by Toomas Soome over 5 years ago. Updated over 5 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 #1

Updated by Electric Monk over 5 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 6f459ff5b49a8482416f3eab8866c784121ecae3

commit  6f459ff5b49a8482416f3eab8866c784121ecae3
Author: Toomas Soome <tsoome@me.com>
Date:   2018-02-07T16:41:30.000Z

    9031 sgs/libld: comparison between pointer and zero character constant
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF