Project

General

Profile

Bug #10865

ibmf: comparison between pointer and integer

Added by Toomas Soome 10 months ago. Updated 9 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Debug build error with NULL pointer:

    In file included from ../../common/sys/model.h:35:0,
                     from ../../common/sys/resource.h:221,
                     from ../../common/sys/user.h:73,
                     from ../../common/sys/proc.h:36,
                     from ../../common/sys/systm.h:40,
                     from ../../common/sys/conf.h:57,
                     from ../../common/sys/ib/mgt/ibmf/ibmf_impl.h:39,
                     from ../../common/io/ib/mgt/ibmf/ibmf_wqe.c:30:
    ../../common/io/ib/mgt/ibmf/ibmf_wqe.c: In function 'ibmf_i_init_send_wqe':
    ../../common/io/ib/mgt/ibmf/ibmf_wqe.c:873:21: error: comparison between pointer and integer [-Werror]
      ASSERT(swrp->wr_id != NULL);
                         ^
    ../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                                 ^~

    In file included from ../../common/sys/model.h:35:0,
                     from ../../common/sys/resource.h:221,
                     from ../../common/sys/user.h:73,
                     from ../../common/sys/proc.h:36,
                     from ../../common/sys/systm.h:40,
                     from ../../common/sys/conf.h:57,
                     from ../../common/sys/ib/mgt/ibmf/ibmf_impl.h:39,
                     from ../../common/io/ib/mgt/ibmf/ibmf_recv.c:31:
    ../../common/io/ib/mgt/ibmf/ibmf_recv.c: In function 'ibmf_send_busy':
    ../../common/io/ib/mgt/ibmf/ibmf_recv.c:1589:21: error: comparison between pointer and integer [-Werror]
      ASSERT(swrp->wr_id != NULL);
                         ^
    ../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                                 ^~

    In file included from ../../common/sys/model.h:35:0,
                     from ../../common/sys/resource.h:221,
                     from ../../common/sys/user.h:73,
                     from ../../common/sys/proc.h:36,
                     from ../../common/sys/systm.h:40,
                     from ../../common/sys/conf.h:57,
                     from ../../common/sys/ib/mgt/ibmf/ibmf_impl.h:39,
                     from ../../common/io/ib/mgt/ibmf/ibmf_send.c:33:
    ../../common/io/ib/mgt/ibmf/ibmf_send.c: In function 'ibmf_i_handle_send_completion':
    ../../common/io/ib/mgt/ibmf/ibmf_send.c:271:20: error: comparison between pointer and integer [-Werror]
      ASSERT(wcp->wc_id != NULL);
                        ^
    ../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                                 ^~

    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 9 months ago

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

git commit 525f82272fdf81a1292b8b1d1832d2012cdfc096

commit  525f82272fdf81a1292b8b1d1832d2012cdfc096
Author: Toomas Soome <tsoome@me.com>
Date:   2019-05-15T20:07:12.000Z

    10865 ibmf: comparison between pointer and integer
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF