Actions
Bug #9374
closedsvr4pkg: comparison between pointer and zero character constant
Start date:
2018-03-27
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
Issues found by gcc 7 build:
svr4pkg: comparison between pointer and zero character constant pkgops.c: In function 'pkgTestInstalled': pkgops.c:1156:20: error: comparison between pointer and zero character const ant [-Werror=pointer-compare] assert(a_rootPath != '\0'); ^ /code/illumos-gate/proto/root_i386/usr/include/assert.h:78:28: note: in defi nition of macro 'assert' #define assert(EX) (void)((EX) || (__assert(#EX, __FILE__, __LINE__), 0)) ^~ pkgops.c:1156:9: note: did you mean to dereference the pointer? assert(a_rootPath != '\0'); ^ /code/illumos-gate/proto/root_i386/usr/include/assert.h:78:28: note: in definition of macro 'assert' #define assert(EX) (void)((EX) || (__assert(#EX, __FILE__, __LINE__), 0)) ^~ cc1: all warnings being treated as errors pkgcond: comparison between pointer and zero character constant main.c: In function 'resolvePath': main.c:3465:14: error: comparison between pointer and zero character constant [-Werror=pointer-compare] if (*r_path == '\0') { ^~ main.c:3465:6: note: did you mean to dereference the pointer? if (*r_path == '\0') { ^ cc1: all warnings being treated as errors
Updated by Electric Monk about 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit c7a0678d54bbc87f507a8909a193f75cbb463ede
commit c7a0678d54bbc87f507a8909a193f75cbb463ede Author: Toomas Soome <tsoome@me.com> Date: 2018-05-16T10:02:58.000Z 9374 svr4pkg: comparison between pointer and zero character constant Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Reviewed by: John Levon <john.levon@joyent.com> Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Actions