10424 uts: NULL pointer errors in DEBUG build

Review Request #1493 - Created Feb. 19, 2019 and submitted

Information
Toomas Soome
illumos-gate
10424
b5b8e37...
Reviewers
general
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:56,
                 from ../../common/os/bio.c:47:
../../common/os/bio.c: In function 'getblk_common':
../../common/os/bio.c:645:36: error: comparison between pointer and integer [-We
rror]
   ASSERT((bp->b_flags & B_NOCACHE) == NULL);
                                    ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/os/bio.c:719:36: error: comparison between pointer and integer [-We
rror]
  ASSERT((nbp->b_flags & B_NOCACHE) == NULL);
                                    ^
../../common/sys/debug.h:59:29: note: in definition of macro 'ASSERT'
 #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~

../../common/os/taskq.c: In function 'taskq_dispatch':
../../common/os/taskq.c:713:10: error: return makes integer from pointer without
 a cast [-Werror=int-conversion]
   return (NULL);     \
          ^
../../common/os/taskq.c:1165:3: note: in expansion of macro 'TASKQ_S_RANDOM_DISP
ATCH_FAILURE'
   TASKQ_S_RANDOM_DISPATCH_FAILURE(tq, flags);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../common/os/taskq.c:703:10: error: return makes integer from pointer without
 a cast [-Werror=int-conversion]
   return (NULL);     \
          ^
../../common/os/taskq.c:1188:2: note: in expansion of macro 'TASKQ_D_RANDOM_DISP
ATCH_FAILURE'
  TASKQ_D_RANDOM_DISPATCH_FAILURE(tq, flags);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
*** Error code 1

  
Andrew Stormont
Andy Fiddaman
Gergő Mihály Doma
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...