Project

General

Profile

Actions

Bug #10753

closed

qlc: NULL pointer errors

Added by Toomas Soome about 3 years ago. Updated about 3 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

NULL pointer errors:

    ../../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

Actions #1

Updated by Electric Monk about 3 years ago

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

git commit c92b35bb664ce1e1d7dc0a4dcdcc791aef0fe69e

commit  c92b35bb664ce1e1d7dc0a4dcdcc791aef0fe69e
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-23T19:20:14.000Z

    10753 qlc: NULL pointer errors
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF