Project

General

Profile

Actions

Bug #10862

closed

mac: comparison between pointer and integer

Added by Toomas Soome over 4 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

DEBUG build with NULL pointer issues:

    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/io/mac/mac.c:278:
    ../../common/io/mac/mac.c: In function 'mac_reclaim_ring_from_grp':
    ../../common/io/mac/mac.c:5978:25: error: comparison between pointer and integer [-Werror]
      ASSERT(mcip->mci_share == NULL);
                             ^
    ../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                                 ^~
    ../../common/io/mac/mac.c: In function 'mac_group_ring_modify':
    ../../common/io/mac/mac.c:7536:25: error: comparison between pointer and integer [-Werror]
      ASSERT(mcip->mci_share == 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/vnode.h:51,
                     from ../../common/vm/seg.h:43,
                     from ../../common/vm/as.h:47,
                     from ../../common/sys/devops.h:37,
                     from ../../common/sys/sunddi.h:39,
                     from ../../common/sys/mac.h:33,
                     from ../../common/io/mac/mac_hio.c:32:
    ../../common/io/mac/mac_hio.c: In function 'i_mac_share_alloc':
    ../../common/io/mac/mac_hio.c:63:25: error: comparison between pointer and integer [-Werror]
      ASSERT(mcip->mci_share == 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

Actions

Also available in: Atom PDF