Project

General

Profile

Bug #11145

cfgadm_plugins: NULL pointer errors

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    ../common/cfga_sata.c: In function 'cfga_change_state':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:610:59: note: in expansion of macro 'NULL'
      if ((rv = do_control_ioctl(ap_id, SATA_CFGA_GET_AP_TYPE, NULL,
                                                               ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    ../common/cfga_sata.c: In function 'cfga_private_func':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:987:54: note: in expansion of macro 'NULL'
       rv = do_control_ioctl(ap_id, SATA_CFGA_RESET_PORT, NULL,
                                                          ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1021:56: note: in expansion of macro 'NULL'
       rv = do_control_ioctl(ap_id, SATA_CFGA_RESET_DEVICE, NULL,
                                                            ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1043:53: note: in expansion of macro 'NULL'
       rv = do_control_ioctl(ap_id, SATA_CFGA_RESET_ALL, NULL,
                                                         ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1065:59: note: in expansion of macro 'NULL'
       rv = do_control_ioctl(ap_id, SATA_CFGA_PORT_DEACTIVATE, NULL,
                                                               ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1088:7: note: in expansion of macro 'NULL'
           NULL, (void **)&str_p, &size);
           ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1111:7: note: in expansion of macro 'NULL'
           NULL, (void **)&str_p, &size);
           ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    ../common/cfga_sata.c: In function 'cfga_list_ext':
    ../common/cfga_sata.c:1563:28: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      (*ap_id_list)->ap_info[0] = NULL;
                                ^
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1574:7: note: in expansion of macro 'NULL'
           NULL, (void **)&str_p, &size)) != CFGA_SATA_OK) {
           ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1601:7: note: in expansion of macro 'NULL'
           NULL, (void **)&str_p, &size)) != CFGA_SATA_OK) {
           ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1628:7: note: in expansion of macro 'NULL'
           NULL, (void **)&str_p, &size)) != CFGA_SATA_OK) {
           ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1652:60: note: in expansion of macro 'NULL'
       if ((rv = do_control_ioctl(ap_id, SATA_CFGA_GET_AP_TYPE, NULL,
                                                                ^~~~
    ../common/cfga_sata.c:237:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    ../common/cfga_sata.c: In function 'setup_for_devctl_cmd':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'nvlist_alloc' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:1925:54: note: in expansion of macro 'NULL'
      if (nvlist_alloc(user_nvlistp, NV_UNIQUE_NAME_TYPE, NULL) != 0) {
                                                          ^~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/errorq.h:32:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ddifm_impl.h:30,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ndifm.h:35,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ddi_impldefs.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/sunddi.h:43,
                     from /code/illumos-gate/proto/root_i386/usr/include/libdevice.h:32,
                     from ../common/cfga_sata.h:42,
                     from ../common/cfga_sata.c:33:
    /code/illumos-gate/proto/root_i386/usr/include/sys/nvpair.h:155:5: note: expected 'int' but argument is of type 'void *'
     int nvlist_alloc(nvlist_t **, uint_t, int);
         ^~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from ../common/cfga_sata.c:28:
    ../common/cfga_sata.c: In function 'sata_get_devicepath':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_sata.c:2107:58: note: in expansion of macro 'NULL'
      rv = do_control_ioctl(ap_id, SATA_CFGA_GET_DEVICE_PATH, NULL,
                                                              ^~~~
    ../common/cfga_sata.c:1989:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, sata_cfga_apctl_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~

    ../common/shp.c: In function 'cfga_private_func':
    ../common/shp.c:957:15: error: comparison between pointer and integer [-Werror]
              *str != NULL; i++, str++) {
                   ^~

    ../common/cfga_rep.c: In function 'search_line':
    ../common/cfga_rep.c:85:26: error: comparison between pointer and integer [-Werror]
      if (buf == NULL || *buf == NULL || buflen <= 0)
                              ^~
    ../common/cfga_rep.c:88:36: error: comparison between pointer and integer [-Werror]
      if (srch_str == NULL || *srch_str == NULL || slen <= 0)
                                        ^~
    ../common/cfga_cs.c: In function 'do_devctl_dev_create':
    ../common/cfga_cs.c:74:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      *dev_path = NULL;
                ^
    ../common/cfga_list.c: In function 'init_ldata_for_accessible_FCP_dev':
    ../common/cfga_list.c:3090:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *dtype = NULL;
              ^
    ../common/cfga_list.c:3099:14: error: comparison between pointer and integer [-Werror]
       if (*dtype == NULL) {
                  ^~

    ../common/cfga_conf.c: In function 'ib_get_var_type':
    ../common/cfga_conf.c:120:37: error: comparison between pointer and integer [-Werror]
       if (strcasecmp(cfgvar->name, str) == NULL)
                                         ^~

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/cfga_ib.h:33,
                     from ../common/cfga_ib.c:27:
    ../common/cfga_ib.c: In function 'ib_setup_for_devctl_cmd':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'devctl_ap_acquire' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_ib.c:623:45: note: in expansion of macro 'NULL'
      if ((*devctl_hdl = devctl_ap_acquire(apid, NULL)) == NULL) {
                                                 ^~~~
    In file included from ../common/cfga_ib.h:43:0,
                     from ../common/cfga_ib.c:27:
    /code/illumos-gate/proto/root_i386/usr/include/libdevice.h:54:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     devctl_ap_acquire(char *devfs_path, uint_t flags);
     ^~~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/cfga_ib.h:33,
                     from ../common/cfga_ib.c:27:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'nvlist_alloc' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_ib.c:631:54: note: in expansion of macro 'NULL'
      if (nvlist_alloc(user_nvlistp, NV_UNIQUE_NAME_TYPE, NULL) != 0) {
                                                          ^~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/errorq.h:32:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ddifm_impl.h:30,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ndifm.h:35,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ddi_impldefs.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/sunddi.h:43,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ib/ibtl/ibtl_types.h:36,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ib/ibnex/ibnex_devctl.h:30,
                     from ../common/cfga_ib.h:41,
                     from ../common/cfga_ib.c:27:
    /code/illumos-gate/proto/root_i386/usr/include/sys/nvpair.h:155:5: note: expected 'int' but argument is of type 'void *'
     int nvlist_alloc(nvlist_t **, uint_t, int);
         ^~~~~~~~~~~~

    ../common/cfga_configfile.c: In function 'get_string':
    ../common/cfga_configfile.c:128:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *llptr = NULL;
              ^
    ../common/cfga_configfile.c: In function 'usb_get_var_type':
    ../common/cfga_configfile.c:259:37: error: comparison between pointer and integer [-Werror]
       if (strcasecmp(cfgvar->name, str) == NULL) {
                                         ^~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/cfga_usb.h:34,
                     from ../common/cfga_usb.c:28:
    ../common/cfga_usb.c: In function 'setup_for_devctl_cmd':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'nvlist_alloc' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_usb.c:533:54: note: in expansion of macro 'NULL'
      if (nvlist_alloc(user_nvlistp, NV_UNIQUE_NAME_TYPE, NULL) != 0) {
                                                          ^~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/errorq.h:32:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ddifm_impl.h:30,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ndifm.h:35,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/ddi_impldefs.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/sunddi.h:43,
                     from /code/illumos-gate/proto/root_i386/usr/include/libdevice.h:32,
                     from ../common/cfga_usb.h:40,
                     from ../common/cfga_usb.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/nvpair.h:155:5: note: expected 'int' but argument is of type 'void *'
     int nvlist_alloc(nvlist_t **, uint_t, int);
         ^~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/cfga_usb.h:34,
                     from ../common/cfga_usb.c:28:
    ../common/cfga_usb.c: In function 'set_configuration':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_usb.c:806:56: note: in expansion of macro 'NULL'
      if ((rv = do_control_ioctl(ap_id, HUBD_REFRESH_DEVDB, NULL,
                                                            ^~~~
    ../common/cfga_usb.c:624:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, uint_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/cfga_usb.h:34,
                     from ../common/cfga_usb.c:28:
    ../common/cfga_usb.c: In function 'get_config':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_usb.c:835:61: note: in expansion of macro 'NULL'
      if ((rv = do_control_ioctl(ap_id, HUBD_GET_CURRENT_CONFIG, NULL,
                                                                 ^~~~
    ../common/cfga_usb.c:624:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, uint_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/cfga_usb.h:34,
                     from ../common/cfga_usb.c:28:
    ../common/cfga_usb.c: In function 'fill_in_ap_info':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_usb.c:904:56: note: in expansion of macro 'NULL'
      if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_DEV, NULL,
                                                            ^~~~
    ../common/cfga_usb.c:624:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, uint_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/cfga_usb.h:34,
                     from ../common/cfga_usb.c:28:
    ../common/cfga_usb.c: In function 'cfga_private_func':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_usb.c:1386:57: note: in expansion of macro 'NULL'
       if ((rv = do_control_ioctl(ap_id, USB_DESCR_TYPE_DEV, NULL,
                                                             ^~~~
    ../common/cfga_usb.c:624:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, uint_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    ../common/cfga_usb.c: In function 'cfga_list_ext':
    ../common/cfga_usb.c:1596:28: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      (*ap_id_list)->ap_info[0] = NULL;
                                ^
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/cfga_usb.h:34,
                     from ../common/cfga_usb.c:28:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_usb.c:1610:59: note: in expansion of macro 'NULL'
       if ((rv = do_control_ioctl(ap_id, HUBD_GET_CFGADM_NAME, NULL,
                                                               ^~~~
    ../common/cfga_usb.c:624:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, uint_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/cfga_usb.h:34,
                     from ../common/cfga_usb.c:28:
    ../common/cfga_usb.c: In function 'usb_get_devicepath':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'do_control_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/cfga_usb.c:1728:53: note: in expansion of macro 'NULL'
      rv = do_control_ioctl(ap_id, HUBD_GET_DEVICE_PATH, NULL,
                                                         ^~~~
    ../common/cfga_usb.c:624:1: note: expected 'uint_t {aka unsigned int}' but argument is of type 'void *'
     do_control_ioctl(const char *ap_id, uint_t subcommand, uint_t arg,
     ^~~~~~~~~~~~~~~~

    ../common/cfga.c: In function 'cfga_private_func':
    ../common/cfga.c:1083:15: error: comparison between pointer and integer [-Werror]
              *str != NULL; i++, str++) {
                   ^~
    ../common/cfga.c: In function 'find_physical_slot_names':
    ../common/cfga.c:1280:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^
    ../common/cfga.c:1288: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 3 months ago

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

git commit 21f023df5de311466c7fef39e70e23b3551a16d5

commit  21f023df5de311466c7fef39e70e23b3551a16d5
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-03T07:34:25.000Z

    11145 cfgadm_plugins: NULL pointer errors
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF