Project

General

Profile

Bug #10878

i86pc/i86xpv: comparison between pointer and integer

Added by Toomas Soome 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
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/os/brand.c:27:
    ../../common/os/brand.c: In function 'brand_solaris_elfexec':
    ../../common/os/brand.c:721:23: error: comparison between pointer and integer [-
    Werror]
      ASSERT(sed.sed_entry != NULL);
                           ^
    ../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
     #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                                 ^~
    ../../common/os/brand.c:722:22: error: comparison between pointer and integer [-
    Werror]
      ASSERT(sed.sed_phdr != 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/krtld/kobj.c:38:
    ../../common/krtld/kobj.c: In function 'crypto_es_hash':
    ../../common/krtld/kobj.c:2721:23: error: comparison between pointer and integer
     [-Werror]
       ASSERT(shp->sh_addr != 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

This source is built for both i86pc and i86xpv.

History

#1

Updated by Electric Monk 6 months ago

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

git commit fb46ffcae2cbe5ba3f2fe0c3104beb0a222897fd

commit  fb46ffcae2cbe5ba3f2fe0c3104beb0a222897fd
Author: Toomas Soome <tsoome@me.com>
Date:   2019-05-15T20:14:46.000Z

    10878 i86pc/i86xpv: comparison between pointer and integer
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF