Project

General

Profile

Bug #10874

bpf: comparison between pointer and integer

Added by Toomas Soome 6 months ago. Updated 5 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 errors 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/io/bpf/bpf.c:68:
    ../../common/io/bpf/bpf.c: In function 'bpf_attachd':
    ../../common/io/bpf/bpf.c:255:19: error: comparison between pointer and integer
    [-Werror]
      ASSERT(d->bd_bif == NULL);
                       ^
    ../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                                 ^~
    ../../common/io/bpf/bpf.c:256:20: error: comparison between pointer and integer
    [-Werror]
      ASSERT(d->bd_mcip == 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 5 months ago

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

git commit 359e27264eda8177268ebed6a93c6fc4f601f3ce

commit  359e27264eda8177268ebed6a93c6fc4f601f3ce
Author: Toomas Soome <tsoome@me.com>
Date:   2019-05-16T19:22:46.000Z

    10874 bpf: comparison between pointer and integer
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF