Project

General

Profile

Actions

Bug #10870

closed

dtrace: comparison between pointer and integer

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

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

100%

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

Description

Debug build errors with NULL pointer:

    In file included from ../../common/dtrace/dtrace.c:78:0:
    ../../common/dtrace/dtrace.c: In function 'dtrace_dif_emulate':
    ../../common/dtrace/dtrace.c:6094:14: error: comparison between pointer and integer [-Werror]
         ASSERT(a != NULL);
                  ^
    ../../common/sys/dtrace_impl.h:1309:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || \
                                 ^~
    ../../common/dtrace/dtrace.c: In function 'dtrace_difo_destroy':
    ../../common/dtrace/dtrace.c:10297:27: error: comparison between pointer and integer [-Werror]
        ASSERT(svar->dtsv_data != NULL);
                               ^
    ../../common/sys/dtrace_impl.h:1309:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || \
                                 ^~
    ../../common/dtrace/dtrace.c: In function 'dtrace_actdesc_create':
    ../../common/dtrace/dtrace.c:10493:47: error: comparison between pointer and integer [-Werror]
      ASSERT(!DTRACEACT_ISPRINTFLIKE(kind) || (arg != NULL &&
                                                   ^
    ../../common/sys/dtrace_impl.h:1309:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || \
                                 ^~
    ../../common/dtrace/dtrace.c:10494:33: error: comparison between pointer and integer [-Werror]
          arg >= KERNELBASE) || (arg == NULL && kind == DTRACEACT_PRINTA));
                                     ^
    ../../common/sys/dtrace_impl.h:1309:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || \
                                 ^~
    ../../common/dtrace/dtrace.c: In function 'dtrace_ecb_action_add':
    ../../common/dtrace/dtrace.c:11009:16: error: comparison between pointer and integer [-Werror]
         ASSERT(arg != NULL);
                    ^
    ../../common/sys/dtrace_impl.h:1309:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || \
                                 ^~
    ../../common/dtrace/dtrace.c: In function 'dtrace_toxrange_add':
    ../../common/dtrace/dtrace.c:15961:52: error: comparison between pointer and integer [-Werror]
      ASSERT(dtrace_toxrange[dtrace_toxranges].dtt_base == NULL);
                                                        ^
    ../../common/sys/dtrace_impl.h:1309:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || \
                                 ^~
    ../../common/dtrace/dtrace.c:15962:53: error: comparison between pointer and integer [-Werror]
      ASSERT(dtrace_toxrange[dtrace_toxranges].dtt_limit == NULL);
                                                         ^
    ../../common/sys/dtrace_impl.h:1309:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || \
                                 ^~
    cc1: all warnings being treated as errors

Actions

Also available in: Atom PDF