11322 dfs.cmds: NULL pointer errors

Review Request #2060 - Created July 4, 2019 and submitted

Information
Toomas Soome
illumos-gate
11322
92904f2...
Reviewers
general
In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                 from ../sharectl.c:29:
../sharectl.c: In function 'run_command':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'cmdvec->cmdfunc' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../sharectl.c:596:32: note: in expansion of macro 'NULL'
  ret = cmdvec->cmdfunc(handle, NULL, argc, argv);
                                ^~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: expected 'int' but argument is of type 'void *'
 #define NULL ((void *)0)
              ^
../sharectl.c:596:32: note: in expansion of macro 'NULL'
  ret = cmdvec->cmdfunc(handle, NULL, argc, argv);
                                ^~~~

In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                 from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                 from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                 from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                 from ../commands.c:28:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../commands.c:5900:18: note: in expansion of macro 'NULL'
  {NULL, 0, NULL, NULL}
                  ^~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'commands[16].cmdidx')
 #define NULL ((void *)0)
              ^
../commands.c:5900:18: note: in expansion of macro 'NULL'
  {NULL, 0, NULL, NULL}
                  ^~~~
cc1: all warnings being treated as errors

  
Garrett D'Amore
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...