10753 qlc: NULL pointer errors

Review Request #1719 — Created April 12, 2019 and submitted

tsoome
illumos-gate
10753
ed49e3a...
general
../../common/io/fibre-channel/fca/qlc/ql_debug.c: In function 'ql_dump_el_trace_buffer':
../../common/io/fibre-channel/fca/qlc/ql_debug.c:515:11: error: comparison between pointer and integer [-Werror]
  if (rval != NULL) {
           ^~
../../common/io/fibre-channel/fca/qlc/ql_debug.c:545:29: error: comparison between pointer and integer [-Werror]
    } else if (*dump_current == NULL) {
                             ^~
../../common/io/fibre-channel/fca/qlc/ql_debug.c: In function 'ql_find_trace_start':
../../common/io/fibre-channel/fca/qlc/ql_debug.c:609:25: error: comparison between pointer and integer [-Werror]
  } else if (*trace_next != NULL) {
                         ^~

../../common/io/fibre-channel/fca/qlc/ql_ioctl.c: In function 'ql_nv_util_dump':
../../common/io/fibre-channel/fca/qlc/ql_ioctl.c:1050:28: error: comparison between pointer and integer [-Werror]
      ha->nvram_cache->size == NULL ||
                            ^~
../../common/io/fibre-channel/fca/qlc/ql_ioctl.c: In function 'ql_vpd_lookup':
../../common/io/fibre-channel/fca/qlc/ql_ioctl.c:1529:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   bp[len] = NULL;
           ^
../../common/io/fibre-channel/fca/qlc/ql_ioctl.c:1532:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   bp[0] = NULL;
         ^
../../common/io/fibre-channel/fca/qlc/ql_ioctl.c:1533:17: error: comparison between pointer and integer [-Werror]
   if (opcode[1] != NULL) {
                 ^~
../../common/io/fibre-channel/fca/qlc/ql_ioctl.c: In function 'ql_adm_updfwmodule':
../../common/io/fibre-channel/fca/qlc/ql_ioctl.c:2446:53: error: comparison between pointer and integer [-Werror]
   if ((fw_class == ha2->fw_class) && (ha2->fw_class == NULL)) {
                                                     ^~

../../common/io/fibre-channel/fca/qlc/ql_xioctl.c: In function 'ql_enqueue_aen':
../../common/io/fibre-channel/fca/qlc/ql_xioctl.c:1891:47: error: comparison between pointer and integer [-Werror]
  if (aen_queue[xp->aen_q_tail].AsyncEventCode != NULL) {
                                               ^~

In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:48:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/sys/scsi/scsi_types.h:39,
                 from ../../common/sys/fibre-channel/fca/qlc/ql_apps.h:49,
                 from ../../common/io/fibre-channel/fca/qlc/ql_api.c:47:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/sys/fibre-channel/fca/qlc/ql_api.h:2096:3: note: in expansion of macro 'NULL'
  {NULL, NULL}     \
   ^~~~
../../common/io/fibre-channel/fca/qlc/ql_api.c:555:29: note: in expansion of macro 'ELS_CMD_TABLE'
 cmd_table_t els_cmd_tbl[] = ELS_CMD_TABLE();
                             ^~~~~~~~~~~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: note: (near initialization for 'els_cmd_tbl[19].cmd')
 #define NULL ((void *)0)
              ^
../../common/sys/fibre-channel/fca/qlc/ql_api.h:2096:3: note: in expansion of macro 'NULL'
  {NULL, NULL}     \
   ^~~~
../../common/io/fibre-channel/fca/qlc/ql_api.c:555:29: note: in expansion of macro 'ELS_CMD_TABLE'
 cmd_table_t els_cmd_tbl[] = ELS_CMD_TABLE();
                             ^~~~~~~~~~~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/sys/fibre-channel/fca/qlc/ql_mbx.h:891:3: note: in expansion of macro 'NULL'
  {NULL, "Unsupported"}      \
   ^~~~
../../common/io/fibre-channel/fca/qlc/ql_api.c:557:30: note: in expansion of macro 'MBOX_CMD_TABLE'
 cmd_table_t mbox_cmd_tbl[] = MBOX_CMD_TABLE();
                              ^~~~~~~~~~~~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: note: (near initialization for 'mbox_cmd_tbl[82].cmd')
 #define NULL ((void *)0)
              ^
../../common/sys/fibre-channel/fca/qlc/ql_mbx.h:891:3: note: in expansion of macro 'NULL'
  {NULL, "Unsupported"}      \
   ^~~~
../../common/io/fibre-channel/fca/qlc/ql_api.c:557:30: note: in expansion of macro 'MBOX_CMD_TABLE'
 cmd_table_t mbox_cmd_tbl[] = MBOX_CMD_TABLE();
                              ^~~~~~~~~~~~~~
../../common/io/fibre-channel/fca/qlc/ql_api.c: In function 'ql_un_init_pkt':
../../common/io/fibre-channel/fca/qlc/ql_api.c:2666:20: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   sp->magic_number = NULL;
                    ^
../../common/io/fibre-channel/fca/qlc/ql_api.c: In function 'ql_els_flogi':
../../common/io/fibre-channel/fca/qlc/ql_api.c:5243:30: error: comparison between pointer and integer [-Werror]
  if ((tq != NULL) || (accept != NULL)) {
                              ^~
../../common/io/fibre-channel/fca/qlc/ql_api.c: In function 'ql_timer':
../../common/io/fibre-channel/fca/qlc/ql_api.c:9707:29: error: comparison between pointer and integer [-Werror]
    if (ha->send_plogi_timer != NULL) {
                             ^~
../../common/io/fibre-channel/fca/qlc/ql_api.c:9709:30: error: comparison between pointer and integer [-Werror]
     if (ha->send_plogi_timer == NULL) {
                              ^~
../../common/io/fibre-channel/fca/qlc/ql_api.c: In function 'ql_alloc_phys':
../../common/io/fibre-channel/fca/qlc/ql_api.c:15621:34: error: comparison between pointer and integer [-Werror]
    if (dma_attr.dma_attr_addr_hi == NULL) {
                                  ^~
../../common/io/fibre-channel/fca/qlc/ql_api.c:15622:34: error: comparison between pointer and integer [-Werror]
     if (mem->cookie.dmac_notused != NULL) {
                                  ^~
cc1: all warnings being treated as errors


marcel
  1. Ship It!
  2. 
      
rm
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...