Project

General

Profile

Bug #9343

ib: comparison between pointer and zero character constant

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2018-03-24
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

issue found by gcc 7 build:

    ../../common/io/ib/ibnex/ibnex_ioctl.c: In function 'ibnex_devctl':
    ../../common/io/ib/ibnex/ibnex_ioctl.c:865:38: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
       if ((apid_n = ibnex_get_apid(dcp)) == '\0') {
                                          ^~
    ../../common/io/ib/ibnex/ibnex_ioctl.c:865:7: note: did you mean to dereference the pointer?
       if ((apid_n = ibnex_get_apid(dcp)) == '\0') {
           ^
    ../../common/io/ib/ibnex/ibnex_ioctl.c:973:38: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
       if ((apid_n = ibnex_get_apid(dcp)) == '\0') {
                                          ^~
    ../../common/io/ib/ibnex/ibnex_ioctl.c:973:7: note: did you mean to dereference the pointer?
       if ((apid_n = ibnex_get_apid(dcp)) == '\0') {
           ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk over 1 year ago

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

git commit cf95dd1699b88778bfda4b3d97e13237466400c4

commit  cf95dd1699b88778bfda4b3d97e13237466400c4
Author: Toomas Soome <tsoome@me.com>
Date:   2018-04-01T21:48:01.000Z

    9343 ib: comparison between pointer and zero character constant
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF