Project

General

Profile

Bug #11323

syseventd: NULL pointer errors

Added by Toomas Soome 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    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

History

#1

Updated by Electric Monk 3 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit c7cb3c8ba9fee2d8fc1a3ba06662ed84679fbd66

commit  c7cb3c8ba9fee2d8fc1a3ba06662ed84679fbd66
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-08T17:59:29.000Z

    11323 syseventd: NULL pointer errors
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF