Project

General

Profile

Actions

Bug #10862

closed

mac: comparison between pointer and integer

Added by Toomas Soome over 3 years ago. Updated over 3 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:

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 #1

Updated by Electric Monk over 3 years ago

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

git commit 6895f6f4d5c99fd997130635c4a4bff68554bb8e

commit  6895f6f4d5c99fd997130635c4a4bff68554bb8e
Author: Toomas Soome <tsoome@me.com>
Date:   2019-05-15T20:02:39.000Z

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

Actions

Also available in: Atom PDF