Project

General

Profile

Actions

Bug #11405

closed

power: NULL pointer errors

Added by Toomas Soome about 3 years ago. Updated about 3 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Build errors with NULL pointer:

    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

Actions #1

Updated by Electric Monk about 3 years ago

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

git commit 3f77e798e029df017fe2a6df5b524cf0808b7faa

commit  3f77e798e029df017fe2a6df5b524cf0808b7faa
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-26T05:27:00.000Z

    11405 power: NULL pointer errors
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF