10773 sata: NULL pointer errors

Review Request #1738 - Created April 14, 2019 and submitted

Information
Toomas Soome
illumos-gate
10773
d72d2af...
Reviewers
general
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/sata/impl/sata.c:36:
../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/sys/sata/sata_blacklist.h:57:2: note: in expansion of macro 'NULL'
  NULL
  ^~~~
../../common/sys/null.h:32:14: note: (near initialization for 'sata_pmult_blacklist[3].bl_gscr0')
 #define NULL ((void *)0)
              ^
../../common/sys/sata/sata_blacklist.h:57:2: note: in expansion of macro 'NULL'
  NULL
  ^~~~
../../common/io/sata/impl/sata.c: In function 'sata_scsi_start':
../../common/io/sata/impl/sata.c:2535:49: error: comparison between pointer and integer [-Werror]
         (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) ==
                                                 ^~
../../common/io/sata/impl/sata.c:2541:46: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                              ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_generic_pkt_info':
../../common/io/sata/impl/sata.c:3261:49: error: comparison between pointer and integer [-Werror]
         (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) ==
                                                 ^~
../../common/io/sata/impl/sata.c:3267:46: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                              ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_invalid_command':
../../common/io/sata/impl/sata.c:3488:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:3493:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_check_condition':
../../common/io/sata/impl/sata.c:3537:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:3542:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_nodata_cmd_immediate':
../../common/io/sata/impl/sata.c:3587:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:3592:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_inquiry':
../../common/io/sata/impl/sata.c:3914:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:3919:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_request_sense':
../../common/io/sata/impl/sata.c:4064:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:4069:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_test_unit_ready':
../../common/io/sata/impl/sata.c:4157:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:4162:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_start_stop_unit':
../../common/io/sata/impl/sata.c:4491:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:4496:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_read_capacity':
../../common/io/sata/impl/sata.c:4606:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:4611:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_read_capacity16':
../../common/io/sata/impl/sata.c:4788:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:4793:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_mode_sense':
../../common/io/sata/impl/sata.c:5237:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:5242:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_mode_select':
../../common/io/sata/impl/sata.c:5566:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:5571:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_log_sense':
../../common/io/sata/impl/sata.c:6068:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:6073:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_write_buffer':
../../common/io/sata/impl/sata.c:6802:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:6807:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_lba_out_of_range':
../../common/io/sata/impl/sata.c:7229:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:7234:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_ata_pass_thru_illegal_cmd':
../../common/io/sata/impl/sata.c:7371:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:7376:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_txlt_unmap_nodata_cmd':
../../common/io/sata/impl/sata.c:7405:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_emul_rw_completion':
../../common/io/sata/impl/sata.c:7434:48: error: comparison between pointer and integer [-Werror]
        (void *)spx->txlt_scsi_pkt, TQ_NOSLEEP) == NULL) {
                                                ^~
../../common/io/sata/impl/sata.c:7439:45: error: comparison between pointer and integer [-Werror]
       (void *)spx->txlt_scsi_pkt, TQ_SLEEP) == NULL) {
                                             ^~
../../common/io/sata/impl/sata.c: In function 'sata_process_controller_events':
../../common/io/sata/impl/sata.c:18156:51: error: comparison between pointer and integer [-Werror]
   if (cportinfo == NULL || cportinfo->cport_state == NULL)
                                                   ^~
cc1: all warnings being treated as errors

  
Andrew Stormont
Robert Mustacchi
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...