11149 libpkg: NULL pointer errors

Review Request #1934 — Created June 1, 2019 and submitted

tsoome
illumos-gate
11149
a06bf43...
general
../common/devtype.c: In function 'devtype':
../common/devtype.c:62:21: error: comparison between pointer and integer [-Werror]
      devp->mount[0] != NULL) {
                     ^~

../common/mappath.c: In function 'mappath':
../common/mappath.c:96:16: error: comparison between pointer and integer [-Werror]
         *token != NULL) {
                ^~
../common/runcmd.c: In function 'ecleanup':
../common/runcmd.c:91:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   errfile[0] = NULL;
              ^

In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                 from ../common/dstream.c:36:
../common/dstream.c: In function 'ds_getnextvol':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'getvol' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/dstream.c:611:31: note: in expansion of macro 'NULL'
  if (n = getvol(device, NULL, NULL, prompt))
                               ^~~~
../common/dstream.c:57:12: note: expected 'int' but argument is of type 'void *'
 extern int getvol(char *device, char *label, int options, char *prompt);
            ^~~~~~

../common/verify.c: In function 'averify':
../common/verify.c:438:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
     *c = NULL;
        ^
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                 from ../common/verify.c:32:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'mknod' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/verify.c:698:44: note: in expansion of macro 'NULL'
     if (mknod(path, ainfo->mode | S_IFIFO, NULL) ||
                                            ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/stat.h:517:0,
                 from ../common/verify.c:39:
/code/illumos-gate/proto/root_i386/usr/include/sys/stat_impl.h:55:12: note: expected 'dev_t {aka long unsigned int}' but argument is of type 'void *'
 extern int mknod(const char *, mode_t, dev_t);
            ^~~~~

In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                 from ../common/pkgtrans.c:36:
../common/pkgtrans.c: In function '_pkgtrans':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of '_getvol' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/pkgtrans.c:256:41: note: in expansion of macro 'NULL'
   if (n = _getvol(srcdev.bdevice, NULL, NULL,
                                         ^~~~
../common/pkgtrans.c:69:12: note: expected 'int' but argument is of type 'void *'
 extern int _getvol(char *device, char *label, int options, char *prompt,
            ^~~~~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                 from ../common/pkgtrans.c:36:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of '_getvol' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/pkgtrans.c:357:38: note: in expansion of macro 'NULL'
   (n = _getvol(srcdev.cdevice, NULL, NULL, NULL,
                                      ^~~~
../common/pkgtrans.c:69:12: note: expected 'int' but argument is of type 'void *'
 extern int _getvol(char *device, char *label, int options, char *prompt,
            ^~~~~~~
cc1: all warnings being treated as errors


ptribble
  1. Ship It!
  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...