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/test/util-tests/tests/libnvpair_json/Makefile
          +++ new/usr/src/test/util-tests/tests/libnvpair_json/Makefile
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3  # Common Development and Distribution License ("CDDL"), version 1.0.
   4    4  # You may only use this file in accordance with the terms of version
   5    5  # 1.0 of the CDDL.
   6    6  #
   7    7  # A full copy of the text of the CDDL should have accompanied this
   8    8  # source.  A copy of the CDDL is also available via the Internet at
   9    9  # http://www.illumos.org/license/CDDL.
  10   10  #
  11   11  
  12   12  #
  13      -# Copyright (c) 2014 Joyent, Inc.
       13 +# Copyright 2019 Joyent, Inc.
  14   14  #
  15   15  
  16   16  include $(SRC)/Makefile.master
  17   17  
  18   18  ROOTOPTPKG = $(ROOT)/opt/util-tests
  19   19  TESTDIR = $(ROOTOPTPKG)/tests/libnvpair_json
  20   20  ROOTBINDIR = $(ROOTOPTPKG)/bin
  21   21  
  22   22  PROG = print_json
  23   23  
↓ open down ↓ 12 lines elided ↑ open up ↑
  36   36  include $(SRC)/test/Makefile.com
  37   37  
  38   38  OBJS = $(PROG:%=%.o)
  39   39  SRCS = $(OBJS:%.o=%.c)
  40   40  
  41   41  CMDS = $(PROG:%=$(ROOTBINDIR)/%) $(SCRIPTS:%=$(TESTDIR)/%)
  42   42  $(CMDS) := FILEMODE = 0555
  43   43  
  44   44  LDLIBS += -lnvpair
  45   45  
  46      -LINTFLAGS += -erroff=E_FUNC_ARG_UNUSED
       46 +# intentional abort()
       47 +SMOFF += unreachable
  47   48  
  48   49  all: $(PROG)
  49   50  
  50   51  $(PROG): $(OBJS)
  51   52          $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
  52   53          $(POST_PROCESS)
  53   54  
  54   55  install: all $(CMDS)
  55   56  
  56   57  lint: lint_SRCS
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX