Project

General

Profile

Bug #10710

scsi_vhci: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    ../../common/io/scsi/adapters/scsi_vhci/mpapi_impl.c: In function 'vhci_get_prop_lb_list':
    ../../common/io/scsi/adapters/scsi_vhci/mpapi_impl.c:1689:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      oid_list[0] = NULL;
                  ^

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/conf.h:37,
                     from ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c:33:
    ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c: In function 'vhci_attach':
    ../../common/sys/null.h:32:14: error: passing argument 6 of 'ddi_prop_create' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c:754:43: note: in expansion of macro 'NULL'
          "pm-want-child-notification?", NULL, NULL) != DDI_PROP_SUCCESS) {
                                               ^~~~
    In file included from ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c:36:0:
    ../../common/sys/sunddi.h:935:1: note: expected 'int' but argument is of type 'void *'
     ddi_prop_create(dev_t dev, dev_info_t *dip, int flag,
     ^~~~~~~~~~~~~~~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/conf.h:37,
                     from ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c:33:
    ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c: In function 'vhci_attach':
    ../../common/sys/null.h:32:14: error: passing argument 6 of 'ddi_prop_create' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c:754:43: note: in expansion of macro 'NULL'
          "pm-want-child-notification?", NULL, NULL) != DDI_PROP_SUCCESS) {
                                               ^~~~
    In file included from ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c:36:0:
    ../../common/sys/sunddi.h:935:1: note: expected 'int' but argument is of type 'void *'
     ddi_prop_create(dev_t dev, dev_info_t *dip, int flag,
     ^~~~~~~~~~~~~~~
    ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c: In function 'vhci_do_prin':
    ../../common/io/scsi/adapters/scsi_vhci/scsi_vhci.c:2967:38: error: comparison between pointer and integer [-Werror]
           (void *) new_vpkt, KM_NOSLEEP) == NULL) {
                                          ^~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 7 months ago

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

git commit 4e40636a684e148425f364361983709c35489c98

commit  4e40636a684e148425f364361983709c35489c98
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-19T21:14:14.000Z

    10710 scsi_vhci: NULL pointer errors
    Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF