Project

General

Profile

Actions

Bug #10790

closed

i86pc: NULL pointer errors

Added by Toomas Soome over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2019-04-14
Due date:
% Done:

100%

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

Description

NULL pointer errors:

    ../../i86pc/io/amd_iommu/amd_iommu_impl.c: In function 'amd_iommu_fini':
    ../../i86pc/io/amd_iommu/amd_iommu_impl.c:1214:22: error: comparison between pointer and integer [-Werror]
      if (iommu->aiomt_va != NULL) {
                          ^~
    ../../i86pc/io/amd_iommu/amd_iommu_impl.c:1219:19: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       iommu->aiomt_va = NULL;
                       ^
    ../../i86pc/io/amd_iommu/amd_iommu_impl.c:1220:23: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       iommu->aiomt_reg_va = NULL;
                           ^

    ../../i86pc/dboot/dboot_startkern.c: In function 'process_efi32':
    ../../i86pc/dboot/dboot_startkern.c:1669:21: error: comparison between pointer and integer [-Werror]
       if (bi->bi_smbios == NULL &&
                         ^~
    ../../i86pc/dboot/dboot_startkern.c:1678:24: error: comparison between pointer and integer [-Werror]
       if (bi->bi_acpi_rsdp == NULL &&
                            ^~
    ../../i86pc/dboot/dboot_startkern.c: In function 'process_efi64':
    ../../i86pc/dboot/dboot_startkern.c:1702:21: error: comparison between pointer and integer [-Werror]
       if (bi->bi_smbios == NULL &&
                         ^~
    ../../i86pc/dboot/dboot_startkern.c:1712:24: error: comparison between pointer and integer [-Werror]
       if (bi->bi_acpi_rsdp == NULL &&
                            ^~

    ../../intel/amd64/krtld/kobj_boot.c: In function '_kobj_boot':
    ../../intel/amd64/krtld/kobj_boot.c:62:21: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       bootaux[i].ba_val = NULL;
                         ^

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/sysmacros.h:37,
                     from ../../common/os/panic.c:126:
    ../../common/os/panic.c: In function 'panicsys':
    ../../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/os/panic.c:314:43: note: in expansion of macro 'NULL'
       (void) callb_execute_class(CB_CL_PANIC, NULL);
                                               ^~~~
    In file included from ../../common/os/panic.c:135:0:
    ../../common/sys/callb.h:201:14: note: expected 'int' but argument is of type 'void *'
     extern void *callb_execute_class(int, int);
                  ^~~~~~~~~~~~~~~~~~~

    ../../common/os/brand.c: In function 'brand_solaris_elfexec':
    ../../common/os/brand.c:837:21: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        sedp->sed_lddata = NULL;
                         ^
    ../../common/os/brand.c:838:19: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        sedp->sed_base = NULL;
                       ^
    ../../common/os/brand.c:845:20: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        sedp->sed_entry = NULL;
                        ^
    ../../common/os/brand.c:846:19: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        sedp->sed_phdr = NULL;
                       ^
    ../../common/os/brand.c:847:20: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        sedp->sed_phent = NULL;
                        ^
    ../../common/os/brand.c:848:20: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        sedp->sed_phnum = NULL;
                        ^
    ../../common/os/brand.c:849:21: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        sedp->sed_lddata = NULL;
                         ^
    ../../common/os/brand.c:983:11: error: comparison between pointer and integer [-Werror]
       if (val == NULL) {
               ^~

    ../../i86pc/os/pci_cfgacc_x86.c: In function 'pci_cfgacc_check_io':
    ../../i86pc/os/pci_cfgacc_x86.c:220:44: error: comparison between pointer and integer [-Werror]
      if (pci_cfgacc_force_io || (mcfg_mem_base == NULL) ||
                                                ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/vm/hat.h:43,
                     from ../../i86pc/os/mp_implfuncs.c:28:
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/mp_implfuncs.c:73:32: note: in expansion of macro 'NULL'
      &psm_swtab, &psm_swtab, NULL, NULL
                                    ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'psm_swtab.psw_flag')
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/mp_implfuncs.c:73:32: note: in expansion of macro 'NULL'
      &psm_swtab, &psm_swtab, NULL, NULL
                                    ^~~~
    ../../i86pc/os/mp_implfuncs.c: In function 'psm_mod_info':
    ../../i86pc/os/mp_implfuncs.c:170:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
        return ((int)NULL);
                ^

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/systm.h:39,
                     from ../../i86pc/os/graphics.c:27:
    ../../i86pc/os/graphics.c: In function 'progressbar_key_abort':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'ldi_close' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/graphics.c:222:25: note: in expansion of macro 'NULL'
       (void) ldi_close(hdl, NULL, kcred);
                             ^~~~
    In file included from ../../common/sys/ddi_obsolete.h:18:0,
                     from ../../intel/sys/ddi_isa.h:33,
                     from ../../common/sys/ddi_impldefs.h:46,
                     from ../../common/sys/sunddi.h:43,
                     from ../../i86pc/os/graphics.c:31:
    ../../common/sys/sunldi.h:105:12: note: expected 'int' but argument is of type 'void *'
     extern int ldi_close(ldi_handle_t, int flag, cred_t *);
                ^~~~~~~~~

    ../../i86pc/os/fastboot.c: In function 'fastboot_build_mbi':
    ../../i86pc/os/fastboot.c:500:21: error: comparison between pointer and integer [-Werror]
           PAGESIZE, 0)) == NULL) {
                         ^~
    ../../i86pc/os/fastboot.c: In function 'fastboot_reserve_mem':
    ../../i86pc/os/fastboot.c:708:49: error: comparison between pointer and integer [-Werror]
          &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == NULL) {
                                                     ^~
    ../../i86pc/os/fastboot.c:717:49: error: comparison between pointer and integer [-Werror]
          &fastboot_below_1G_dma_attr, PAGESIZE, 0)) == NULL) {
                                                     ^~
    ../../i86pc/os/fastboot.c: In function 'fastboot_free_file':
    ../../i86pc/os/fastboot.c:748:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       fb->fb_va = NULL;
                 ^
    ../../i86pc/os/fastboot.c: In function 'fastboot_load_kernel':
    ../../i86pc/os/fastboot.c:1246:26: error: comparison between pointer and integer [-Werror]
            MMU_PAGESIZE, 0)) == 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/processor.h:38,
                     from ../../intel/sys/x86_archext.h:42,
                     from ../../i86pc/os/cpupm/cpupm_throttle.c:26:
    ../../i86pc/os/cpupm/cpupm_throttle.c: In function 'cpupm_throttle':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'xc_call' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cpupm/cpupm_throttle.c:216:33: note: in expansion of macro 'NULL'
       xc_call((xc_arg_t)throtl_lvl, NULL, NULL,
                                     ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/machsystm.h:45,
                     from ../../i86pc/os/cpupm/cpupm_throttle.c:27:
    ../../i86pc/sys/x_call.h:76:13: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     extern void xc_call(xc_arg_t, xc_arg_t, xc_arg_t, ulong_t *, xc_func_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/processor.h:38,
                     from ../../intel/sys/x86_archext.h:42,
                     from ../../i86pc/os/cpupm/cpupm_throttle.c:26:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'xc_call' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cpupm/cpupm_throttle.c:216:39: note: in expansion of macro 'NULL'
       xc_call((xc_arg_t)throtl_lvl, NULL, NULL,
                                           ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/machsystm.h:45,
                     from ../../i86pc/os/cpupm/cpupm_throttle.c:27:
    ../../i86pc/sys/x_call.h:76:13: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     extern void xc_call(xc_arg_t, xc_arg_t, xc_arg_t, ulong_t *, xc_func_t);
                 ^~~~~~~

    ../../common/krtld/kobj.c: In function 'do_symbols':
    ../../common/krtld/kobj.c:3085:29: error: comparison between pointer and integer [-Werror]
      if (assign == 0 && mp->bss == NULL) {
                                 ^~
    ../../common/krtld/kobj.c: In function 'kobj_segbrk':
    ../../common/krtld/kobj.c:4138:12: error: comparison between pointer and integer [-Werror]
       if (npva == NULL) {
                ^~

    ../../i86pc/os/cms.c: In function 'cms_load_modctl':
    ../../i86pc/os/cms.c:212:60: error: comparison between pointer and integer [-Werror]
      if ((ver = modlookup_by_modctl(modp, "_cms_api_version")) == NULL) {
                                                                ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../intel/sys/cpu_module.h:32,
                     from ../../i86pc/os/cmi_hw.c:40:
    ../../i86pc/os/cmi_hw.c: In function 'ntv_getcr4':
    ../../common/sys/null.h:32:14: error: passing argument 4 of 'call_func_ntv' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cmi_hw.c:720:66: note: in expansion of macro 'NULL'
      (void) call_func_ntv(cp->cpu_id, ntv_getcr4_xc, (xc_arg_t)&val, NULL);
                                                                      ^~~~
    ../../i86pc/os/cmi_hw.c:228:1: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     call_func_ntv(int cpuid, xc_func_t func, xc_arg_t arg1, xc_arg_t arg2)
     ^~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../intel/sys/cpu_module.h:32,
                     from ../../i86pc/os/cmi_hw.c:40:
    ../../i86pc/os/cmi_hw.c: In function 'ntv_setcr4':
    ../../common/sys/null.h:32:14: error: passing argument 4 of 'call_func_ntv' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cmi_hw.c:743:65: note: in expansion of macro 'NULL'
      (void) call_func_ntv(cp->cpu_id, ntv_setcr4_xc, (xc_arg_t)val, NULL);
                                                                     ^~~~
    ../../i86pc/os/cmi_hw.c:228:1: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     call_func_ntv(int cpuid, xc_func_t func, xc_arg_t arg1, xc_arg_t arg2)
     ^~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../intel/sys/cpu_module.h:32,
                     from ../../i86pc/os/cmi_hw.c:40:
    ../../i86pc/os/cmi_hw.c: In function 'ntv_int':
    ../../common/sys/null.h:32:14: error: passing argument 4 of 'call_func_ntv' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cmi_hw.c:850:65: note: in expansion of macro 'NULL'
      (void) call_func_ntv(cp->cpu_id, ntv_int_xc, (xc_arg_t)int_no, NULL);
                                                                     ^~~~
    ../../i86pc/os/cmi_hw.c:228:1: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     call_func_ntv(int cpuid, xc_func_t func, xc_arg_t arg1, xc_arg_t arg2)
     ^~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../intel/sys/cpu_module.h:32,
                     from ../../i86pc/os/cmi_hw.c:40:
    ../../i86pc/os/cmi_hw.c: In function 'cmi_ntv_hwdisable_mce':
    ../../common/sys/null.h:32:14: error: passing argument 1 of 'xc_call' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cmi_hw.c:1723:11: note: in expansion of macro 'NULL'
       xc_call(NULL, NULL, NULL, CPUSET2BV(set),
               ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../intel/sys/cpu_module.h:32,
                     from ../../i86pc/os/cmi_hw.c:40:
    ../../i86pc/sys/x_call.h:76:13: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     extern void xc_call(xc_arg_t, xc_arg_t, xc_arg_t, ulong_t *, xc_func_t);
                 ^~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../intel/sys/cpu_module.h:32,
                     from ../../i86pc/os/cmi_hw.c:40:
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'xc_call' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cmi_hw.c:1723:17: note: in expansion of macro 'NULL'
       xc_call(NULL, NULL, NULL, CPUSET2BV(set),
                     ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../intel/sys/cpu_module.h:32,
                     from ../../i86pc/os/cmi_hw.c:40:
    ../../i86pc/sys/x_call.h:76:13: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     extern void xc_call(xc_arg_t, xc_arg_t, xc_arg_t, ulong_t *, xc_func_t);
                 ^~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../intel/sys/cpu_module.h:32,
                     from ../../i86pc/os/cmi_hw.c:40:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'xc_call' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cmi_hw.c:1723:23: note: in expansion of macro 'NULL'
       xc_call(NULL, NULL, NULL, CPUSET2BV(set),
                           ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../intel/sys/cpu_module.h:32,
                     from ../../i86pc/os/cmi_hw.c:40:
    ../../i86pc/sys/x_call.h:76:13: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     extern void xc_call(xc_arg_t, xc_arg_t, xc_arg_t, ulong_t *, xc_func_t);
                 ^~~~~~~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/avintr.c:29:
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:94:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 1 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[0].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:94:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 1 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:95:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 2 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[1].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:95:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 2 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:96:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 3 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[2].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:96:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 3 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:97:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 4 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[3].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:97:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 4 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:98:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 5 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[4].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:98:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 5 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:99:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 6 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[5].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:99:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 6 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:100:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 7 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[6].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:100:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 7 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:101:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 8 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[7].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:101:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 8 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:102:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 9 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[8].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:102:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 9 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:103:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 10 */
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel_hdl[9].ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:103:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL}, /* level 10 */
          ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:106:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'softlevel1_hdl.ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../common/io/avintr.c:106:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
          ^~~~
    ../../i86pc/os/cmi.c: In function 'cmi_load_modctl':
    ../../i86pc/os/cmi.c:226:60: error: comparison between pointer and integer [-Werror]
      if ((ver = modlookup_by_modctl(modp, "_cmi_api_version")) == NULL) {
                                                                ^~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/systm.h:39,
                     from ../../i86pc/io/cbe.c:27:
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/io/cbe.c:59:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'cbe_low_hdl.ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../i86pc/io/cbe.c:59:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, 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)
                  ^
    ../../i86pc/io/cbe.c:61:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'cbe_clock_hdl.ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../i86pc/io/cbe.c:61:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
          ^~~~

    ../../i86pc/os/startup.c: In function 'get_system_configuration':
    ../../i86pc/os/startup.c:3137:20: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       eprom_kernelbase = 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/processor.h:38,
                     from ../../intel/sys/x86_archext.h:42,
                     from ../../i86pc/os/cpupm/speedstep.c:29:
    ../../i86pc/os/cpupm/speedstep.c: In function 'speedstep_power':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'xc_call' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cpupm/speedstep.c:171:32: note: in expansion of macro 'NULL'
       xc_call((xc_arg_t)req_state, NULL, NULL, CPUSET2BV(set),
                                    ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/machsystm.h:45,
                     from ../../i86pc/os/cpupm/speedstep.c:30:
    ../../i86pc/sys/x_call.h:76:13: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     extern void xc_call(xc_arg_t, xc_arg_t, xc_arg_t, ulong_t *, xc_func_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/processor.h:38,
                     from ../../intel/sys/x86_archext.h:42,
                     from ../../i86pc/os/cpupm/speedstep.c:29:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'xc_call' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cpupm/speedstep.c:171:38: note: in expansion of macro 'NULL'
       xc_call((xc_arg_t)req_state, NULL, NULL, CPUSET2BV(set),
                                          ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/machsystm.h:45,
                     from ../../i86pc/os/cpupm/speedstep.c:30:
    ../../i86pc/sys/x_call.h:76:13: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     extern void xc_call(xc_arg_t, xc_arg_t, xc_arg_t, ulong_t *, xc_func_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/processor.h:38,
                     from ../../intel/sys/x86_archext.h:42,
                     from ../../i86pc/os/cpupm/pwrnow.c:25:
    ../../i86pc/os/cpupm/pwrnow.c: In function 'pwrnow_power':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'xc_call' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cpupm/pwrnow.c:156:32: note: in expansion of macro 'NULL'
       xc_call((xc_arg_t)req_state, NULL, NULL,
                                    ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/machsystm.h:45,
                     from ../../i86pc/os/cpupm/pwrnow.c:26:
    ../../i86pc/sys/x_call.h:76:13: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     extern void xc_call(xc_arg_t, xc_arg_t, xc_arg_t, ulong_t *, xc_func_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/processor.h:38,
                     from ../../intel/sys/x86_archext.h:42,
                     from ../../i86pc/os/cpupm/pwrnow.c:25:
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'xc_call' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/cpupm/pwrnow.c:156:38: note: in expansion of macro 'NULL'
       xc_call((xc_arg_t)req_state, NULL, NULL,
                                          ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/machsystm.h:45,
                     from ../../i86pc/os/cpupm/pwrnow.c:26:
    ../../i86pc/sys/x_call.h:76:13: note: expected 'xc_arg_t {aka long unsigned int}' but argument is of type 'void *'
     extern void xc_call(xc_arg_t, xc_arg_t, xc_arg_t, ulong_t *, xc_func_t);
                 ^~~~~~~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/cpuvar.h:32,
                     from ../../i86pc/os/intr.c:440:
    ../../i86pc/os/intr.c: In function 'cpu_create_intrstat':
    ../../common/sys/null.h:32:14: error: passing argument 7 of 'kstat_create_zone' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/intr.c:1158:37: note: in expansion of macro 'NULL'
          KSTAT_TYPE_NAMED, PIL_MAX * 2, NULL, zoneid);
                                         ^~~~
    In file included from ../../common/sys/sysinfo.h:35:0,
                     from ../../common/sys/cpuvar.h:33,
                     from ../../i86pc/os/intr.c:440:
    ../../common/sys/kstat.h:795:17: note: expected 'uchar_t {aka unsigned char}' but argument is of type 'void *'
     extern kstat_t *kstat_create_zone(const char *, int, const char *,
                     ^~~~~~~~~~~~~~~~~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../i86pc/os/machdep.c:32:
    ../../i86pc/os/machdep.c: In function 'mdboot':
    ../../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)
                  ^
    ../../i86pc/os/machdep.c:259:44: note: in expansion of macro 'NULL'
       (void) callb_execute_class(CB_CL_MDBOOT, NULL);
                                                ^~~~
    In file included from ../../i86pc/os/machdep.c:51:0:
    ../../common/sys/callb.h:201:14: note: expected 'int' but argument is of type 'void *'
     extern void *callb_execute_class(int, int);
                  ^~~~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../i86pc/os/machdep.c:32:
    ../../i86pc/os/machdep.c: At top level:
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/machdep.c:1414:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
          ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'lbolt_softint_hdl.ih_pri')
     #define NULL ((void *)0)
                  ^
    ../../i86pc/os/machdep.c:1414:6: note: in expansion of macro 'NULL'
      {0, NULL, NULL, NULL, 0, NULL, NULL, NULL};
          ^~~~

    ../../i86pc/os/fakebop.c: In function 'save_boot_info':
    ../../i86pc/os/fakebop.c:1262:25: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       saved_mbi.drives_addr = NULL;
                             ^
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk over 4 years ago

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

git commit 4da99751f967c5f8f04e17d8881a68c2940f3b06

commit  4da99751f967c5f8f04e17d8881a68c2940f3b06
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-24T12:51:34.000Z

    10790 i86pc: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF