11405 power: NULL pointer errors

Review Request #2127 - Created July 11, 2019 and submitted

Information
Toomas Soome
illumos-gate
11405
bc67935...
Reviewers
general
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 sys-suspend.c:32:
sys-suspend.c: In function 'wait_for_auqueue':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'auditon' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
sys-suspend.c:200:60: note: in expansion of macro 'NULL'
  while (retries-- && auditon(A_GETSTAT, (caddr_t)&au_stat, NULL) == 0) {
                                                            ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/bsm/adt.h:34:0,
                 from sys-suspend.c:57:
/code/illumos-gate/proto/root_i386/usr/include/bsm/libbsm.h:188:12: note: expected 'int' but argument is of type 'void *'
 extern int auditon(int, caddr_t, int);
            ^~~~~~~

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 powerd.c:27:
powerd.c: In function 'main':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
powerd.c:311:24: note: in expansion of macro 'NULL'
   if (thr_create(NULL, NULL,
                        ^~~~
In file included from powerd.c:36:0:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
            ^~~~~~~~~~
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 powerd.c:27:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
powerd.c:326:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL,
                       ^~~~
In file included from powerd.c:36:0:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
            ^~~~~~~~~~
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 powerd.c:27:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
powerd.c:338:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL,
                       ^~~~
In file included from powerd.c:36:0:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
            ^~~~~~~~~~
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 powerd.c:27:
powerd.c: In function 'do_attach':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
powerd.c:1249:24: note: in expansion of macro 'NULL'
   if (thr_create(NULL, NULL, attach_devices, NULL,
                        ^~~~
In file included from powerd.c:36:0:
/code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka unsigned 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

  
Andy Fiddaman
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...