9374 svr4pkg: comparison between pointer and zero character constant

Review Request #1017 - Created March 27, 2018 and submitted

Information
Toomas Soome
illumos-gate
9374
eb17388...
Reviewers
general
pkgops.c: In function 'pkgTestInstalled':
pkgops.c:1156:20: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
  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))
                            ^~
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

  

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Andrew Stormont
Toomas Soome
Andy Fiddaman
John Levon
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...