Project

General

Profile

Bug #10793

apix: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    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 ../../i86pc/io/pcplusmp/apic_common.c:40:
    ../../i86pc/io/pcplusmp/apic_common.c: In function 'cmci_cpu_setup':
    ../../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/io/pcplusmp/apic_common.c:395:12: note: in expansion of macro 'NULL'
        xc_call(NULL, NULL, NULL, CPUSET2BV(cpu_set),
                ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/psm_types.h:40,
                     from ../../i86pc/sys/psm.h:45,
                     from ../../i86pc/io/pcplusmp/apic_common.c:42:
    ../../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 ../../i86pc/io/pcplusmp/apic_common.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/io/pcplusmp/apic_common.c:395:18: note: in expansion of macro 'NULL'
        xc_call(NULL, NULL, NULL, CPUSET2BV(cpu_set),
                      ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/psm_types.h:40,
                     from ../../i86pc/sys/psm.h:45,
                     from ../../i86pc/io/pcplusmp/apic_common.c:42:
    ../../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 ../../i86pc/io/pcplusmp/apic_common.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/io/pcplusmp/apic_common.c:395:24: note: in expansion of macro 'NULL'
        xc_call(NULL, NULL, NULL, CPUSET2BV(cpu_set),
                            ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/psm_types.h:40,
                     from ../../i86pc/sys/psm.h:45,
                     from ../../i86pc/io/pcplusmp/apic_common.c:42:
    ../../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 ../../i86pc/io/pcplusmp/apic_common.c:40:
    ../../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/io/pcplusmp/apic_common.c:400:12: note: in expansion of macro 'NULL'
        xc_call(NULL, NULL, NULL, CPUSET2BV(cpu_set),
                ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/psm_types.h:40,
                     from ../../i86pc/sys/psm.h:45,
                     from ../../i86pc/io/pcplusmp/apic_common.c:42:
    ../../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 ../../i86pc/io/pcplusmp/apic_common.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/io/pcplusmp/apic_common.c:400:18: note: in expansion of macro 'NULL'
        xc_call(NULL, NULL, NULL, CPUSET2BV(cpu_set),
                      ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/psm_types.h:40,
                     from ../../i86pc/sys/psm.h:45,
                     from ../../i86pc/io/pcplusmp/apic_common.c:42:
    ../../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 ../../i86pc/io/pcplusmp/apic_common.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/io/pcplusmp/apic_common.c:400:24: note: in expansion of macro 'NULL'
        xc_call(NULL, NULL, NULL, CPUSET2BV(cpu_set),
                            ^~~~
    In file included from ../../i86pc/sys/machcpuvar.h:37:0,
                     from ../../common/sys/cpuvar.h:40,
                     from ../../i86pc/sys/psm_types.h:40,
                     from ../../i86pc/sys/psm.h:45,
                     from ../../i86pc/io/pcplusmp/apic_common.c:42:
    ../../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);
                 ^~~~~~~

    ../../i86pc/io/apix/apix.c: In function 'apix_softinit':
    ../../i86pc/io/apix/apix.c:327:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *iptr++ = NULL;
               ^
    ../../i86pc/io/apix/apix.c: In function 'apix_get_intr_handler':
    ../../i86pc/io/apix/apix.c:359:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 2 months ago

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

git commit 5ffc25366dbf720731d0c0ba074595513d16690e

commit  5ffc25366dbf720731d0c0ba074595513d16690e
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-25T15:12:54.000Z

    10793 apix: NULL pointer errors
    Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF