Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/brand/shared/brand/Makefile.com
          +++ new/usr/src/lib/brand/shared/brand/Makefile.com
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  #
  22   22  # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  23   23  #
  24   24  # Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  25   25  #
  26      -# Copyright (c) 2019, Joyent, Inc.
       26 +# Copyright 2019 Joyent, Inc.
  27   27  #
  28   28  
  29   29  COBJS =         brand_util.o
  30   30  ASOBJS =        crt.o handler.o runexe.o
  31   31  OFFSETS_SRC =   ../common/offsets.in
  32   32  OFFSETS_H =     assym.h
  33   33  OBJECTS =       $(COBJS) $(ASOBJS)
  34   34  CLOBBERFILES += $(OFFSETS_H)
  35   35  
  36   36  include $(SRC)/lib/Makefile.lib
↓ open down ↓ 11 lines elided ↑ open up ↑
  48   48  # as does not handle certian constructs that gas does.  So rather than
  49   49  # make our code less readable, we'll just use gas to compile our 32-bit
  50   50  # code as well.
  51   51  #
  52   52  i386_AS         = $(amd64_AS)
  53   53  
  54   54  CPPFLAGS +=     -D_REENTRANT -U_ASM -I. -I../sys
  55   55  CFLAGS +=       $(CCVERBOSE)
  56   56  ASFLAGS =       -P $(ASFLAGS_$(CURTYPE)) -D_ASM -I. -I../sys
  57   57  
       58 +# intentional code after abort()
       59 +SMOFF += unreachable
       60 +
  58   61  .KEEP_STATE:
  59   62  
  60   63  #
  61   64  # build the offset header before trying to compile any files.  (it's included
  62   65  # by brand_misc.h, so it's needed for all objects, not just assembly ones.)
  63   66  #
  64   67  # Note we have to build assym.h via its dependency on pics/% so that the
  65   68  # target dependent assignment of CTF_FLAGS will be there, otherwise make
  66   69  # will see two different commands to build it (endless rebuilds).
  67   70  #
  68   71  all: pics .WAIT $$(PICS)
  69   72  
  70      -lint: lintcheck
  71      -
  72   73  $(OBJECTS:%=pics/%): $(OFFSETS_H)
  73   74  
  74   75  $(OFFSETS_H): $(OFFSETS_SRC)
  75   76          $(OFFSETS_CREATE) < $(OFFSETS_SRC) >$@
  76   77  
  77   78  pics/%.o: $(ISASRCDIR)/%.s
  78   79          $(COMPILE.s) -o $@ $<
  79   80          $(POST_PROCESS_S_O)
  80   81  
  81   82  include $(SRC)/lib/Makefile.targ
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX