11323 syseventd: NULL pointer errors

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

Information
Toomas Soome
illumos-gate
11323
02c9c65...
Reviewers
general
In file included from /code/illumos-gate/proto/root_i386/usr/include/unistd.h:40:0,
                 from sysevent_reg_mod.c:29:
sysevent_reg_mod.c: In function 'slm_init':
/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)
              ^
sysevent_reg_mod.c:235:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL, (void *(*)(void *))subscriber_deliver_thr,
                       ^~~~
In file included from sysevent_reg_mod.c:35: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 syseventconfd.c:51:
syseventconfd.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)
              ^
syseventconfd.c:186:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL, (void *(*)(void *))sigwait_thr,
                       ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/libsysevent.h:29:0,
                 from syseventconfd.c:64:
/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/unistd.h:40:0,
                 from devfsadmd_mod.c:25:
devfsadmd_mod.c: In function 'slm_init':
/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)
              ^
devfsadmd_mod.c:336:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL, (void *(*)(void *))devfsadmd_deliver_thr,
                       ^~~~
In file included from devfsadmd_mod.c:30: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 syseventd.c:35:
syseventd.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)
              ^
syseventd.c:456:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL, (void *(*)(void *))dispatch_message,
                       ^~~~
In file included from syseventd.c:50: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 syseventd.c:35:
/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)
              ^
syseventd.c:461:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL,
                       ^~~~
In file included from syseventd.c:50: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 syseventd.c:35:
/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)
              ^
syseventd.c:468:23: note: in expansion of macro 'NULL'
  if (thr_create(NULL, NULL, (void *(*)(void *))sigwait_thr,
                       ^~~~
In file included from syseventd.c:50: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 sysevent_conf_mod.c:50:
sysevent_conf_mod.c: In function 'slm_init':
/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)
              ^
sysevent_conf_mod.c:2210:30: note: in expansion of macro 'NULL'
  if ((err = thr_create(NULL, NULL, (void *(*)(void*))queue_flush_thr,
                              ^~~~
In file included from sysevent_conf_mod.c:58: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

  
Garrett D'Amore
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...