Project

General

Profile

Actions

Bug #9028

closed

libc: comparison between pointer and zero character constant

Added by Toomas Soome over 4 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Issue revealed by gcc 7:

    ../port/gen/nlspath_checks.c: In function 'clean_env':
    ../port/gen/nlspath_checks.c:629:30: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
       for (p++; (p[-off] = p[0]) != '\0'; p++)
                                  ^~
    ../port/gen/nlspath_checks.c:629:13: note: did you mean to dereference the pointer?
       for (p++; (p[-off] = p[0]) != '\0'; p++)
                 ^
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk over 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 9a67df4bb0ad84bdbd1a1441f5ddef328cc000f0

commit  9a67df4bb0ad84bdbd1a1441f5ddef328cc000f0
Author: Toomas Soome <tsoome@me.com>
Date:   2018-02-05T22:48:20.000Z

    9028 libc: comparison between pointer and zero character constant
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Rob Johnston <rob.johnston@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF