11300 cpustat: NULL pointer errors

Review Request #2046 - Created July 1, 2019 and submitted

Information
Toomas Soome
illumos-gate
11300
7ccba5a...
Reviewers
general
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 ../common/cpustat.c:26:
/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)
              ^
../common/cpustat.c:93:37: note: in expansion of macro 'NULL'
 static pcinfo_t fxinfo = { 0, "FX", NULL }; /* FX scheduler class info */
                                     ^~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'fxinfo.pc_clinfo[0]')
 #define NULL ((void *)0)
              ^
../common/cpustat.c:93:37: note: in expansion of macro 'NULL'
 static pcinfo_t fxinfo = { 0, "FX", NULL }; /* FX scheduler class info */
                                     ^~~~
../common/cpustat.c: In function 'gtick':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 5 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../common/cpustat.c:447:42: note: in expansion of macro 'NULL'
   if (thr_create(NULL, 0, soaker, state, NULL, &tid) != 0)
                                          ^~~~
In file included from ../common/cpustat.c:40:0:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'long int' but argument is of type 'void *'
 extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
            ^~~~~~~~~~
cc1: all warnings being treated as errors

  
John Levon
Garrett D'Amore
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...