Project

General

Profile

Actions

Bug #10376

closed

uts: NULL pointer issues in genunix

Added by Toomas Soome almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2019-02-11
Due date:
% Done:

100%

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

Description

Build errors with NULL pointer:

    In file included from ../../common/io/stream.c:49:0:
    ../../common/io/stream.c: In function 'getq_noenab':
    ../../common/sys/strft.h:176:32: error: passing argument 4 of 'str_ftevent' makes integer from pointer without a cast [-Werror=int-conversion]
         str_ftevent(_hp, (p), (e), (d)); \
                                    ^
    ../../common/io/stream.c:2092:2: note: in expansion of macro 'STR_FTEVENT_MSG'
      STR_FTEVENT_MSG(bp, q, FTEV_GETQ, NULL);
      ^~~~~~~~~~~~~~~
    ../../common/sys/strft.h:140:13: note: expected 'ushort_t {aka short unsigned int}' but argument is of type 'void *'
     extern void str_ftevent(fthdr_t *, void *, ushort_t, ushort_t);
                 ^~~~~~~~~~~
    ../../common/io/stream.c: In function 'rmvq_noenab':
    ../../common/sys/strft.h:176:32: error: passing argument 4 of 'str_ftevent' makes integer from pointer without a cast [-Werror=int-conversion]
         str_ftevent(_hp, (p), (e), (d)); \
                                    ^
    ../../common/io/stream.c:2289:2: note: in expansion of macro 'STR_FTEVENT_MSG'
      STR_FTEVENT_MSG(mp, q, FTEV_RMVQ, NULL);
      ^~~~~~~~~~~~~~~
    ../../common/sys/strft.h:140:13: note: expected 'ushort_t {aka short unsigned int}' but argument is of type 'void *'
     extern void str_ftevent(fthdr_t *, void *, ushort_t, ushort_t);
                 ^~~~~~~~~~~
    ../../common/io/stream.c: In function 'flushq_common':
    ../../common/sys/strft.h:189:31: error: passing argument 4 of 'str_ftevent' makes integer from pointer without a cast [-Werror=int-conversion]
        str_ftevent(_hp, (p), (e), (d));  \
                                   ^
    ../../common/io/stream.c:2337:3: note: in expansion of macro 'STR_FTEVENT_MBLK'
       STR_FTEVENT_MBLK(mp, q, FTEV_FLUSHQ, NULL);
       ^~~~~~~~~~~~~~~~
    ../../common/sys/strft.h:140:13: note: expected 'ushort_t {aka short unsigned int}' but argument is of type 'void *'
     extern void str_ftevent(fthdr_t *, void *, ushort_t, ushort_t);
                 ^~~~~~~~~~~
    ../../common/io/stream.c: In function 'putq':
    ../../common/sys/strft.h:176:32: error: passing argument 4 of 'str_ftevent' makes integer from pointer without a cast [-Werror=int-conversion]
         str_ftevent(_hp, (p), (e), (d)); \
                                    ^
    ../../common/io/stream.c:2776:2: note: in expansion of macro 'STR_FTEVENT_MSG'
      STR_FTEVENT_MSG(bp, q, FTEV_PUTQ, NULL);
      ^~~~~~~~~~~~~~~
    ../../common/sys/strft.h:140:13: note: expected 'ushort_t {aka short unsigned int}' but argument is of type 'void *'
     extern void str_ftevent(fthdr_t *, void *, ushort_t, ushort_t);
                 ^~~~~~~~~~~
    ../../common/io/stream.c: In function 'putbq':
    ../../common/sys/strft.h:176:32: error: passing argument 4 of 'str_ftevent' makes integer from pointer without a cast [-Werror=int-conversion]
         str_ftevent(_hp, (p), (e), (d)); \
                                    ^
    ../../common/io/stream.c:2958:2: note: in expansion of macro 'STR_FTEVENT_MSG'
      STR_FTEVENT_MSG(bp, q, FTEV_PUTBQ, NULL);
      ^~~~~~~~~~~~~~~
    ../../common/sys/strft.h:140:13: note: expected 'ushort_t {aka short unsigned int}' but argument is of type 'void *'
     extern void str_ftevent(fthdr_t *, void *, ushort_t, ushort_t);
                 ^~~~~~~~~~~
    ../../common/io/stream.c: In function 'insq':
    ../../common/sys/strft.h:176:32: error: passing argument 4 of 'str_ftevent' makes integer from pointer without a cast [-Werror=int-conversion]
         str_ftevent(_hp, (p), (e), (d)); \
                                    ^
    ../../common/io/stream.c:3098:2: note: in expansion of macro 'STR_FTEVENT_MSG'
      STR_FTEVENT_MSG(mp, q, FTEV_INSQ, NULL);
      ^~~~~~~~~~~~~~~
    ../../common/sys/strft.h:140:13: note: expected 'ushort_t {aka short unsigned int}' but argument is of type 'void *'
     extern void str_ftevent(fthdr_t *, void *, ushort_t, ushort_t);
                 ^~~~~~~~~~~

    ../../common/os/streamio.c: In function 'strioctl':
    ../../common/os/streamio.c:5472:11: error: comparison between pointer and integer [-Werror]
       if (arg == NULL) { /* Return number of modules plus driver */
               ^~

    ../../common/os/strsubr.c: In function 'esballoc_enqueue_mblk':
    ../../common/os/strsubr.c:4037:18: error: comparison between pointer and integer [-Werror]
          TQ_NOSLEEP) == NULL) {
                      ^~

    ../../common/vm/seg_kp.c: In function 'swapsize':
    ../../common/vm/seg_kp.c:1360:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/signal.h:249,
                     from ../../common/sys/procset.h:40,
                     from ../../common/sys/pool.h:32,
                     from ../../common/os/pool.c:26:
    ../../common/os/pool.c: In function 'pool_status':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'pool_event_dispatch' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pool.c:569:38: note: in expansion of macro 'NULL'
       pool_event_dispatch(POOL_E_ENABLE, NULL);
                                          ^~~~
    ../../common/os/pool.c:161:6: note: expected 'poolid_t {aka int}' but argument is of type 'void *'
     void pool_event_dispatch(pool_event_t, poolid_t);
          ^~~~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/signal.h:249,
                     from ../../common/sys/procset.h:40,
                     from ../../common/sys/pool.h:32,
                     from ../../common/os/pool.c:26:
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'pool_event_dispatch' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pool.c:576:39: note: in expansion of macro 'NULL'
       pool_event_dispatch(POOL_E_DISABLE, NULL);
                                           ^~~~
    ../../common/os/pool.c:161:6: note: expected 'poolid_t {aka int}' but argument is of type 'void *'
     void pool_event_dispatch(pool_event_t, poolid_t);
          ^~~~~~~~~~~~~~~~~~~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/sysmacros.h:37,
                     from ../../common/os/policy.c:28:
    ../../common/os/policy.c: In function 'secpolicy_rpcmod_open':
    ../../common/sys/null.h:32:14: error: incompatible type for argument 2 of 'secpolicy_net_config'
     #define NULL ((void *)0)
                  ^
    ../../common/os/policy.c:2073:36: note: in expansion of macro 'NULL'
       return (secpolicy_net_config(cr, NULL));
                                        ^~~~
    ../../common/os/policy.c:1941:1: note: expected 'boolean_t {aka enum <anonymous>}' but argument is of type 'void *'
     secpolicy_net_config(const cred_t *cr, boolean_t checkonly)
     ^~~~~~~~~~~~~~~~~~~~
    ../../common/os/policy.c:2074:1: error: control reaches end of non-void function [-Werror=return-type]
     }
     ^

    ../../common/syscall/lgrpsys.c: In function 'meminfo':
    ../../common/syscall/lgrpsys.c:185:18: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
         out_array[i] = NULL;
                      ^
    ../../common/syscall/lgrpsys.c: In function 'lgrp_snapshot_copy32':
    ../../common/syscall/lgrpsys.c:1860:10: error: comparison between pointer and integer [-Werror]
      if (buf == NULL || bufsize <= 0) {
              ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/buf.h:45,
                     from ../../common/sys/devops.h:35,
                     from ../../common/sys/sunddi.h:39,
                     from ../../common/sys/esunddi.h:29,
                     from ../../common/sys/sunndi.h:32,
                     from ../../common/os/sunpci.c:26:
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/sunpci.c:360:29: note: in expansion of macro 'NULL'
      {PCI_CAP_NEXT_PTR_NULL, 0, NULL}
                                 ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'pci_cap_table[21].cap_mask')
     #define NULL ((void *)0)
                  ^
    ../../common/os/sunpci.c:360:29: note: in expansion of macro 'NULL'
      {PCI_CAP_NEXT_PTR_NULL, 0, NULL}
                                 ^~~~

    ../../common/os/main.c: In function 'exec_init':
    ../../common/os/main.c:280:18: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      lwp->lwp_arg[2] = NULL;
                      ^

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/syscall/lwp_create.c:29:
    ../../common/syscall/lwp_create.c: In function 'syslwp_create':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'lwp_create' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/syscall/lwp_create.c:129:34: note: in expansion of macro 'NULL'
      lwp = lwp_create(lwp_rtt, NULL, NULL, curproc, TS_STOPPED,
                                      ^~~~
    In file included from ../../common/sys/systm.h:40:0,
                     from ../../common/syscall/lwp_create.c:32:
    ../../common/sys/proc.h:744:18: note: expected 'size_t {aka long unsigned int}' but argument is of type 'void *'
     extern klwp_t   *lwp_create(
                      ^~~~~~~~~~

    ../../common/inet/ip/inet_ntop.c: In function '__inet_pton':
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/inet/ip/inet_ntop.c:288:19: note: in expansion of macro 'NULL'
       char lastbyte = NULL;
                       ^~~~
    ../../common/inet/ip/inet_ntop.c:336:13: error: comparison between pointer and integer [-Werror]
        if (*end == NULL || i == 7) {
                 ^~
    ../../common/inet/ip/inet_ntop.c:352:21: error: comparison between pointer and integer [-Werror]
         } else if (*inp == NULL || *inp == ' ' ||
                         ^~
    ../../common/inet/ip/inet_ntop.c:365:13: error: comparison between pointer and integer [-Werror]
        if (*inp == NULL || *inp == ' ' || *inp == '\t') {
                 ^~
    ../../common/inet/ip/inet_ntop.c:370:12: error: comparison between pointer and integer [-Werror]
       if (*inp != NULL && *inp != ' ' && *inp != '\t') {
                ^~

    ../../common/os/exec.c: In function 'exec_common':
    ../../common/os/exec.c:359:25: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      curthread->t_predcache = NULL;
                             ^
    ../../common/os/exec.c: In function 'stk_copyin':
    ../../common/os/exec.c:1667:25: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
         *(args->stk_offp++) = NULL;
                             ^

    ../../common/os/evchannels.c: In function 'evch_evq_destroy':
    ../../common/os/evchannels.c:562:20: error: comparison between pointer and integer [-Werror]
      if (eqp->eq_thrid != NULL) {
                        ^~

    ../../common/os/dumpsubr.c: In function 'dumpinit':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'fop_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/vnode.h:1115:21: note: in definition of macro 'VOP_IOCTL'
      fop_ioctl(vp, cmd, a, f, cr, rvp, ct)
                         ^
    ../../common/os/dumpsubr.c:1258:24: note: in expansion of macro 'NULL'
             DKIOCDUMPINIT, NULL, FKIOCTL, kcred,
                            ^~~~
    ../../common/sys/vnode.h:1024:12: note: expected 'intptr_t {aka long int}' but argument is of type 'void *'
     extern int fop_ioctl(vnode_t *, int, intptr_t, int, cred_t *, int *,
                ^~~~~~~~~
    ../../common/os/dumpsubr.c: In function 'dumpfini':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'fop_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/vnode.h:1115:21: note: in definition of macro 'VOP_IOCTL'
      fop_ioctl(vp, cmd, a, f, cr, rvp, ct)
                         ^
    ../../common/os/dumpsubr.c:1303:45: note: in expansion of macro 'NULL'
        (void) VOP_IOCTL(cdev_vp, DKIOCDUMPFINI, NULL, FKIOCTL,
                                                 ^~~~
    ../../common/sys/vnode.h:1024:12: note: expected 'intptr_t {aka long int}' but argument is of type 'void *'
     extern int fop_ioctl(vnode_t *, int, intptr_t, int, cred_t *, int *,
                ^~~~~~~~~
    ../../common/os/dumpsubr.c: In function 'dumpsys':
    ../../common/os/dumpsubr.c:2891:15: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       hp->taskqid = NULL;
                   ^

    ../../common/fs/swapfs/swap_vnops.c: In function 'swap_getapage':
    ../../common/fs/swapfs/swap_vnops.c:249:19: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
           ap->an_poff = NULL;
                       ^
    ../../common/fs/swapfs/swap_vnops.c: In function 'swap_getconpage':
    ../../common/fs/swapfs/swap_vnops.c:426:17: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
         ap->an_poff = NULL;
                     ^

    ../../common/os/task.c: In function 'task_rele':
    ../../common/os/task.c:459:31: error: comparison between pointer and integer [-Werror]
          TQ_NOSLEEP | TQ_NOQUEUE) == NULL) {
                                   ^~
    ../../common/os/taskq.c: In function 'taskq_dispatch':
    ../../common/os/taskq.c:1170:11: error: return makes integer from pointer without a cast [-Werror=int-conversion]
        return (NULL);
               ^

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/syscall/uadmin.c:28:
    ../../common/syscall/uadmin.c: In function 'kadmin':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'callb_execute_class' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/syscall/uadmin.c:283:52: note: in expansion of macro 'NULL'
       (void) callb_execute_class(CB_CL_UADMIN_PRE_VFS, NULL);
                                                        ^~~~
    In file included from ../../common/syscall/uadmin.c:44:0:
    ../../common/sys/callb.h:201:14: note: expected 'int' but argument is of type 'void *'
     extern void *callb_execute_class(int, int);
                  ^~~~~~~~~~~~~~~~~~~
    ../../common/syscall/uadmin.c: In function 'uadmin':
    ../../common/syscall/uadmin.c:445:11: error: comparison between pointer and integer [-Werror]
      if (mdep != NULL &&
               ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/os/modctl.c:30:
    ../../common/os/modctl.c: In function 'modctl_hp':
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'ddihp_modctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/modctl.c:2303:25: note: in expansion of macro 'NULL'
           cn_name_str, arg, NULL);
                             ^~~~
    In file included from ../../common/sys/devops.h:48:0,
                     from ../../common/sys/conf.h:57,
                     from ../../common/os/modctl.c:36:
    ../../common/sys/ddi_hp_impl.h:133:5: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     int ddihp_modctl(int hp_op, char *path, char *cn_name, uintptr_t arg,
         ^~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/os/modctl.c:30:
    ../../common/sys/null.h:32:14: error: passing argument 4 of 'ddihp_modctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/modctl.c:2308:20: note: in expansion of macro 'NULL'
           cn_name_str, NULL, NULL);
                        ^~~~
    In file included from ../../common/sys/devops.h:48:0,
                     from ../../common/sys/conf.h:57,
                     from ../../common/os/modctl.c:36:
    ../../common/sys/ddi_hp_impl.h:133:5: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     int ddihp_modctl(int hp_op, char *path, char *cn_name, uintptr_t arg,
         ^~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/os/modctl.c:30:
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'ddihp_modctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/modctl.c:2308:26: note: in expansion of macro 'NULL'
           cn_name_str, NULL, NULL);
                              ^~~~
    In file included from ../../common/sys/devops.h:48:0,
                     from ../../common/sys/conf.h:57,
                     from ../../common/os/modctl.c:36:
    ../../common/sys/ddi_hp_impl.h:133:5: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     int ddihp_modctl(int hp_op, char *path, char *cn_name, uintptr_t arg,
         ^~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/os/modctl.c:30:
    ../../common/sys/null.h:32:14: error: passing argument 4 of 'ddihp_modctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/modctl.c:2313:20: note: in expansion of macro 'NULL'
           cn_name_str, NULL, NULL);
                        ^~~~
    In file included from ../../common/sys/devops.h:48:0,
                     from ../../common/sys/conf.h:57,
                     from ../../common/os/modctl.c:36:
    ../../common/sys/ddi_hp_impl.h:133:5: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     int ddihp_modctl(int hp_op, char *path, char *cn_name, uintptr_t arg,
         ^~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/os/modctl.c:30:
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'ddihp_modctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/modctl.c:2313:26: note: in expansion of macro 'NULL'
           cn_name_str, NULL, NULL);
                              ^~~~
    In file included from ../../common/sys/devops.h:48:0,
                     from ../../common/sys/conf.h:57,
                     from ../../common/os/modctl.c:36:
    ../../common/sys/ddi_hp_impl.h:133:5: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
     int ddihp_modctl(int hp_op, char *path, char *cn_name, uintptr_t arg,
         ^~~~~~~~~~~~

    ../../common/io/ptms_conf.c: In function 'ptms_constructor':
    ../../common/io/ptms_conf.c:611:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      pt->pt_pid = NULL;
                 ^
    ../../common/io/ptms_conf.c:612:15: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      pt->pt_minor = NULL;
                   ^

    ../../common/fs/vnode.c: In function 'vn_rele_async':
    ../../common/fs/vnode.c:918:21: error: comparison between pointer and integer [-Werror]
           vp, TQ_SLEEP) != NULL);
                         ^
    ../../common/os/modsysfile.c: In function 'sys_set_var':
    ../../common/os/modsysfile.c:1190:14: error: comparison between pointer and integer [-Werror]
      if (symaddr != NULL) {
                  ^~

    ../../common/os/zone.c: In function 'zsched':
    ../../common/os/zone.c:3839:19: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      PTOU(pp)->u_argv = NULL;
                       ^
    ../../common/os/zone.c:3840:19: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      PTOU(pp)->u_envp = NULL;
                       ^
    ../../common/os/zone.c:3841:24: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      PTOU(pp)->u_commpagep = NULL;
                            ^

    ../../common/fs/dnlc.c: In function 'dnlc_reduce_cache':
    ../../common/fs/dnlc.c:957:36: error: comparison between pointer and integer [-Werror]
           reduce_percent, TQ_NOSLEEP)) == NULL)
                                        ^~

    ../../common/syscall/poll.c: In function 'poll_common':
    ../../common/syscall/poll.c:507:37: error: comparison between pointer and integer [-Werror]
        if (pcset[cacheindex].pcs_usradr == NULL) {
                                         ^~
    ../../common/syscall/poll.c: In function 'pcacheset_cache_list':
    ../../common/syscall/poll.c:2181:32: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        pcacheset[which].pcs_usradr = NULL;
                                    ^

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/buf.h:45,
                     from ../../common/sys/devops.h:35,
                     from ../../common/sys/sunddi.h:39,
                     from ../../common/sys/esunddi.h:29,
                     from ../../common/sys/sunndi.h:32,
                     from ../../common/os/pcifm.c:27:
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:52:8: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
            ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'pci_err_tbl[6].reg_bit')
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:52:8: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
            ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:52:20: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
                        ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'pci_err_tbl[6].flags')
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:52:20: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
                        ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:64:8: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
            ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'pci_bdg_err_tbl[5].reg_bit')
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:64:8: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
            ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:64:20: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
                        ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'pci_bdg_err_tbl[5].flags')
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:64:20: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
                        ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:71:8: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
            ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'pcix_err_tbl[3].reg_bit')
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:71:8: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
            ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:71:20: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
                        ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'pcix_err_tbl[3].flags')
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:71:20: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
                        ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:79:8: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
            ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'pcix_sec_err_tbl[4].reg_bit')
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:79:8: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
            ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:79:20: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
                        ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'pcix_sec_err_tbl[4].flags')
     #define NULL ((void *)0)
                  ^
    ../../common/os/pcifm.c:79:20: note: in expansion of macro 'NULL'
      NULL, NULL, NULL, NULL,
                        ^~~~
    ../../common/os/pcifm.c: In function 'pci_ereport_post':
    ../../common/os/pcifm.c:1116:17: error: comparison between pointer and integer [-Werror]
      if (de.fme_ena == NULL)
                     ^~

    ../../common/io/pci_intr_lib.c: In function 'pci_get_msi_ctrl':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_get' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:81:35: note: in definition of macro 'PCI_CAP_GET16'
      pci_cap_get(h, PCI_CAP_CFGSZ_16, i, b, o))
                                       ^
    ../../common/io/pci_intr_lib.c:121:38: note: in expansion of macro 'NULL'
       if ((*msi_ctrl = PCI_CAP_GET16(*h, NULL, *caps_ptr,
                                          ^~~~
    ../../common/sys/pci_cap.h:110:17: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern uint32_t pci_cap_get(ddi_acc_handle_t h, pci_cap_config_size_t size,
                     ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_get' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:81:35: note: in definition of macro 'PCI_CAP_GET16'
      pci_cap_get(h, PCI_CAP_CFGSZ_16, i, b, o))
                                       ^
    ../../common/io/pci_intr_lib.c:133:38: note: in expansion of macro 'NULL'
       if ((*msi_ctrl = PCI_CAP_GET16(*h, NULL, *caps_ptr,
                                          ^~~~
    ../../common/sys/pci_cap.h:110:17: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern uint32_t pci_cap_get(ddi_acc_handle_t h, pci_cap_config_size_t size,
                     ^~~~~~~~~~~
    ../../common/io/pci_intr_lib.c: In function 'pci_msi_configure':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:217:20: note: in expansion of macro 'NULL'
       PCI_CAP_PUT16(h, NULL, caps_ptr, PCI_MSI_CTRL, msi_ctrl);
                        ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:90:35: note: in definition of macro 'PCI_CAP_PUT32'
      pci_cap_put(h, PCI_CAP_CFGSZ_32, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:223:20: note: in expansion of macro 'NULL'
       PCI_CAP_PUT32(h, NULL, caps_ptr, PCI_MSI_ADDR_OFFSET, addr);
                        ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:90:35: note: in definition of macro 'PCI_CAP_PUT32'
      pci_cap_put(h, PCI_CAP_CFGSZ_32, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:229:21: note: in expansion of macro 'NULL'
        PCI_CAP_PUT32(h, NULL, caps_ptr, PCI_MSI_ADDR_OFFSET
                         ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:236:21: note: in expansion of macro 'NULL'
        PCI_CAP_PUT16(h, NULL, caps_ptr, PCI_MSI_64BIT_DATA,
                         ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:243:21: note: in expansion of macro 'NULL'
        PCI_CAP_PUT16(h, NULL, caps_ptr, PCI_MSI_32BIT_DATA,
                         ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/io/pci_intr_lib.c: In function 'pci_msi_unconfigure':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:310:20: note: in expansion of macro 'NULL'
       PCI_CAP_PUT16(h, NULL, caps_ptr, PCI_MSI_CTRL, msi_ctrl);
                        ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:90:35: note: in definition of macro 'PCI_CAP_PUT32'
      pci_cap_put(h, PCI_CAP_CFGSZ_32, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:312:20: note: in expansion of macro 'NULL'
       PCI_CAP_PUT32(h, NULL, caps_ptr, PCI_MSI_ADDR_OFFSET, 0);
                        ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:315:21: note: in expansion of macro 'NULL'
        PCI_CAP_PUT16(h, NULL, caps_ptr, PCI_MSI_64BIT_DATA,
                         ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:90:35: note: in definition of macro 'PCI_CAP_PUT32'
      pci_cap_put(h, PCI_CAP_CFGSZ_32, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:317:21: note: in expansion of macro 'NULL'
        PCI_CAP_PUT32(h, NULL, caps_ptr, PCI_MSI_ADDR_OFFSET
                         ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:320:21: note: in expansion of macro 'NULL'
        PCI_CAP_PUT16(h, NULL, caps_ptr, PCI_MSI_32BIT_DATA,
                         ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/io/pci_intr_lib.c: In function 'pci_msi_enable_mode':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:414:27: note: in expansion of macro 'NULL'
       PCI_CAP_PUT16(cfg_hdle, NULL, caps_ptr, PCI_MSI_CTRL, msi_ctrl);
                               ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:421:27: note: in expansion of macro 'NULL'
       PCI_CAP_PUT16(cfg_hdle, NULL, caps_ptr, PCI_MSIX_CTRL,
                               ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/io/pci_intr_lib.c: In function 'pci_msi_disable_mode':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:462:27: note: in expansion of macro 'NULL'
       PCI_CAP_PUT16(cfg_hdle, NULL, caps_ptr, PCI_MSI_CTRL, msi_ctrl);
                               ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:468:27: note: in expansion of macro 'NULL'
       PCI_CAP_PUT16(cfg_hdle, NULL, caps_ptr, PCI_MSIX_CTRL,
                               ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/io/pci_intr_lib.c: In function 'pci_msi_set_mask':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_get' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:83:35: note: in definition of macro 'PCI_CAP_GET32'
      pci_cap_get(h, PCI_CAP_CFGSZ_32, i, b, o))
                                       ^
    ../../common/io/pci_intr_lib.c:510:44: note: in expansion of macro 'NULL'
       if ((mask_bits = PCI_CAP_GET32(cfg_hdle, NULL, caps_ptr,
                                                ^~~~
    ../../common/sys/pci_cap.h:110:17: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern uint32_t pci_cap_get(ddi_acc_handle_t h, pci_cap_config_size_t size,
                     ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:90:35: note: in definition of macro 'PCI_CAP_PUT32'
      pci_cap_put(h, PCI_CAP_CFGSZ_32, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:516:27: note: in expansion of macro 'NULL'
       PCI_CAP_PUT32(cfg_hdle, NULL, caps_ptr, offset, mask_bits);
                               ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/io/pci_intr_lib.c: In function 'pci_msi_clr_mask':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_get' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:83:35: note: in definition of macro 'PCI_CAP_GET32'
      pci_cap_get(h, PCI_CAP_CFGSZ_32, i, b, o))
                                       ^
    ../../common/io/pci_intr_lib.c:573:44: note: in expansion of macro 'NULL'
       if ((mask_bits = PCI_CAP_GET32(cfg_hdle, NULL, caps_ptr,
                                                ^~~~
    ../../common/sys/pci_cap.h:110:17: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern uint32_t pci_cap_get(ddi_acc_handle_t h, pci_cap_config_size_t size,
                     ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:90:35: note: in definition of macro 'PCI_CAP_PUT32'
      pci_cap_put(h, PCI_CAP_CFGSZ_32, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:579:27: note: in expansion of macro 'NULL'
       PCI_CAP_PUT32(cfg_hdle, NULL, caps_ptr, offset, mask_bits);
                               ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/io/pci_intr_lib.c: In function 'pci_msi_get_pending':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_get' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:83:35: note: in definition of macro 'PCI_CAP_GET32'
      pci_cap_get(h, PCI_CAP_CFGSZ_32, i, b, o))
                                       ^
    ../../common/io/pci_intr_lib.c:640:47: note: in expansion of macro 'NULL'
       if ((pending_bits = PCI_CAP_GET32(cfg_hdle, NULL, caps_ptr,
                                                   ^~~~
    ../../common/sys/pci_cap.h:110:17: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern uint32_t pci_cap_get(ddi_acc_handle_t h, pci_cap_config_size_t size,
                     ^~~~~~~~~~~
    ../../common/io/pci_intr_lib.c: In function 'pci_msi_set_nintrs':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_put' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:88:35: note: in definition of macro 'PCI_CAP_PUT16'
      pci_cap_put(h, PCI_CAP_CFGSZ_16, i, b, o, d))
                                       ^
    ../../common/io/pci_intr_lib.c:730:27: note: in expansion of macro 'NULL'
       PCI_CAP_PUT16(cfg_hdle, NULL, caps_ptr, PCI_MSI_CTRL, msi_ctrl);
                               ^~~~
    ../../common/sys/pci_cap.h:113:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern int pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
                ^~~~~~~~~~~
    ../../common/io/pci_intr_lib.c: In function 'pci_msix_init':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_get' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:83:35: note: in definition of macro 'PCI_CAP_GET32'
      pci_cap_get(h, PCI_CAP_CFGSZ_32, i, b, o))
                                       ^
    ../../common/io/pci_intr_lib.c:812:52: note: in expansion of macro 'NULL'
      msix_p->msix_tbl_offset = PCI_CAP_GET32(cfg_hdle, NULL, caps_ptr,
                                                        ^~~~
    ../../common/sys/pci_cap.h:110:17: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern uint32_t pci_cap_get(ddi_acc_handle_t h, pci_cap_config_size_t size,
                     ^~~~~~~~~~~
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'pci_cap_get' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/pci_cap.h:83:35: note: in definition of macro 'PCI_CAP_GET32'
      pci_cap_get(h, PCI_CAP_CFGSZ_32, i, b, o))
                                       ^
    ../../common/io/pci_intr_lib.c:873:52: note: in expansion of macro 'NULL'
      msix_p->msix_pba_offset = PCI_CAP_GET32(cfg_hdle, NULL, caps_ptr,
                                                        ^~~~
    ../../common/sys/pci_cap.h:110:17: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern uint32_t pci_cap_get(ddi_acc_handle_t h, pci_cap_config_size_t size,
                     ^~~~~~~~~~~
    ../../common/os/damap.c: In function 'dam_addrset_stable_cb':
    ../../common/os/damap.c:1549:31: error: comparison between pointer and integer [-Werror]
          TQ_NOSLEEP | TQ_NOQUEUE) == NULL)) {
                                   ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/os/dacf.c:72:
    ../../common/sys/null.h:32:14: error: incompatible types when initializing type 'enum dacf_devspec' using type 'void *'
     #define NULL ((void *)0)
                  ^
    ../../common/os/dacf.c:144:12: note: in expansion of macro 'NULL'
      { NULL,   NULL   },
                ^~~~
    ../../common/disp/class.c: In function 'getcidbyname_locked':
    ../../common/disp/class.c:157:14: error: comparison between pointer and integer [-Werror]
      if (*clname == NULL)
                  ^~

    ../../common/ipp/ippconf.c: In function 'hash':
    ../../common/ipp/ippconf.c:3234:32: error: comparison between pointer and integer [-Werror]
      for (ptr = (char *)name; *ptr != NULL; ptr++) {
                                    ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/systm.h:39,
                     from ../../../common/acl/acl_common.c:33:
    ../../../common/acl/acl_common.c: In function 'ace_list_init':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'acevals_init' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../../common/acl/acl_common.c:784:30: note: in expansion of macro 'NULL'
      acevals_init(&al->user_obj, NULL);
                                  ^~~~
    ../../../common/acl/acl_common.c:772:1: note: expected 'uid_t {aka unsigned int}' but argument is of type 'void *'
     acevals_init(acevals_t *vals, uid_t key)
     ^~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/systm.h:39,
                     from ../../../common/acl/acl_common.c:33:
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'acevals_init' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../../common/acl/acl_common.c:785:31: note: in expansion of macro 'NULL'
      acevals_init(&al->group_obj, NULL);
                                   ^~~~
    ../../../common/acl/acl_common.c:772:1: note: expected 'uid_t {aka unsigned int}' but argument is of type 'void *'
     acevals_init(acevals_t *vals, uid_t key)
     ^~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/systm.h:39,
                     from ../../../common/acl/acl_common.c:33:
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'acevals_init' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../../common/acl/acl_common.c:786:31: note: in expansion of macro 'NULL'
      acevals_init(&al->other_obj, NULL);
                                   ^~~~
    ../../../common/acl/acl_common.c:772:1: note: expected 'uid_t {aka unsigned int}' but argument is of type 'void *'
     acevals_init(acevals_t *vals, uid_t key)
     ^~~~~~~~~~~~

    ../../intel/ia32/syscall/getcontext.c: In function 'savecontext':
    ../../intel/ia32/syscall/getcontext.c:77:22: error: comparison between pointer and integer [-Werror]
      if (lwp->lwp_ustack == NULL ||
                          ^~
    ../../intel/ia32/syscall/getcontext.c: In function 'savecontext32':
    ../../intel/ia32/syscall/getcontext.c:269:22: error: comparison between pointer and integer [-Werror]
      if (lwp->lwp_ustack == NULL ||
                          ^~
    ../../common/vm/hat_refmod.c: In function 'hat_freestat':
    ../../common/vm/hat_refmod.c:233:34: error: comparison between pointer and integer [-Werror]
       if ((id == hrm->hrm_id) || (id == NULL)) {
                                      ^~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk almost 5 years ago

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

git commit 7e12ceb3ebc63aeb71e91b496032ca22ca55f660

commit  7e12ceb3ebc63aeb71e91b496032ca22ca55f660
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-20T20:08:00.000Z

    10376 uts: NULL pointer issues in genunix
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF