10710 scsi_vhci: NULL pointer errors

Review Request #1676 — Created April 10, 2019 and submitted

tsoome
illumos-gate
10710
5c89db2...
general
../../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


  • 0
  • 0
  • 54
  • 0
  • 54
Description From Last Updated
wiedi
  1. Ship It!
  2. 
      
domag02
  1. Fix or drop these, as you wish.
  2. Missing blanks around the / operator.

  3. Missing blanks around the / operator.

  4. Missing blanks around the / operator.

  5. Missing blanks around the / operator.

  6. Missing blanks around the / operator.

  7. Missing blanks around the / operator.

  8. Missing blanks around the / operator.

  9. Missing blanks around the / operator.

  10. Missing blanks around the / operator.

  11. Missing blanks around the | operator.

  12. Missing blanks around the + operator.

  13. Missing blanks around the + operator (and also in the next line).

  14. Missing blanks around the + operator (and also in the next line).

  15. Missing blanks around the * operator.

  16. Space followed-by tab.
  17. Missing blanks around the * operator.

  18. Missing blanks around the | operator.

  19. Missing blanks around the | operator.

  20. Missing blanks around the | operators.

  21. Missing blanks around the + operator.

  22. Missing blanks around the + operator.

  23. Missing blanks around the + operator.

  24. Missing blanks around the + operator.

  25. Missing blank after the + operator.

  26. Missing blank after the + operator.

  27. Missing blanks around the * operator.

  28. Missing blanks around the + operator.

  29. Missing blanks around the + operator.

  30. Missing blank after the + operator.

  31. Missing blanks around the + operator.

  32. Missing blanks around the + operator (and also in the next line).

  33. Missing blanks around the + operator (and also in the next line).

  34. Missing blank before the || operator.

  35. Missing blanks around the * operator.

  36. Missing blanks around the | operator.

  37. Missing blanks around the | operator.

  38. Missing blanks around the * operator.

  39. Missing blanks around the | operator.

  40. Missing blanks around the + operator (and also in the next line).

  41. Missing blanks around the + operator.

  42. Missing blanks around the + operator.

  43. Missing blanks around the + operator.

  44. Missing blanks around the + operator.

  45. Missing blanks around the + operator.

  46. Missing blanks around the | operator.

  47. Missing blanks around the | operator.

  48. Missing blanks around the * operator (+ in the following 3 lines).

  49. Missing blanks around the * operator.

  50. Missing blanks around the * operator.

  51. Missing blanks around the * operator.

  52. Missing blanks around the * operator.

  53. Space followed-by tab (+ in the next line).
  54. Space followed-by tab.
  55. Space followed-by tab (+ in the next line).
  56. Space followed-by tab (+ in the following 4 lines).
  57. Space followed-by tab.
  58. Space followed-by tab.
  59. Space followed-by tab.
  60. Should be:

            buf[0] = '\0';
    
  61. 
      
tsoome
wiedi
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...