changeset 19418:4e1c3bef2343

12201 Enable smatch for zonestat and zonestatd Reviewed by: C Fraire <seeemef@mac.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
author Marcel Telka <marcel@telka.sk>
date Fri, 24 Jan 2020 17:59:49 +0100
parents d7eb11443a07
children 8dc4b829d283
files usr/src/cmd/zonestat/zonestat/Makefile usr/src/cmd/zonestat/zonestat/zonestat.c usr/src/cmd/zonestat/zonestatd/Makefile
diffstat 3 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/zonestat/zonestat/Makefile	Wed Jan 22 03:28:42 2020 -0800
+++ b/usr/src/cmd/zonestat/zonestat/Makefile	Fri Jan 24 17:59:49 2020 +0100
@@ -29,14 +29,11 @@
 
 include ../../Makefile.cmd
 
-LDLIBS 		+= -lscf -lzonestat -lumem
+LDLIBS		+= -lscf -lzonestat -lumem
 LINTFLAGS	+= -u
 
 CERRWARN	+= $(CNOWARN_UNINIT)
 
-# not linted
-SMATCH=off
-
 .KEEP_STATE:
 
 .PARALLEL:
--- a/usr/src/cmd/zonestat/zonestat/zonestat.c	Wed Jan 22 03:28:42 2020 -0800
+++ b/usr/src/cmd/zonestat/zonestat/zonestat.c	Fri Jan 24 17:59:49 2020 +0100
@@ -2358,7 +2358,7 @@
 		}
 	}
 
-	if (opt_line_any & (!opt_parseable)) {
+	if (opt_line_any && (!opt_parseable)) {
 		(void) zonestat_error(gettext("-P requires -p"));
 		return (zonestat_usage(B_FALSE));
 	}
--- a/usr/src/cmd/zonestat/zonestatd/Makefile	Wed Jan 22 03:28:42 2020 -0800
+++ b/usr/src/cmd/zonestat/zonestatd/Makefile	Fri Jan 24 17:59:49 2020 +0100
@@ -35,16 +35,13 @@
 SRCS =	zonestatd.c
 
 CPPFLAGS	+= -I$(ADJUNCT_PROTO)/usr/include/libxml2
-LDLIBS 		+= -lkstat -lpool -lexacct -lscf \
+LDLIBS		+= -lkstat -lpool -lexacct -lscf \
 		    -lcontract -lcmdutils -lumem
 
 LINTFLAGS	+= -u
-CERRWARN 	+= -_gcc=-Wno-parentheses
-CERRWARN 	+= -_gcc=-Wno-unused-label
-CERRWARN 	+= $(CNOWARN_UNINIT)
-
-# not linted
-SMATCH=off
+CERRWARN	+= -_gcc=-Wno-parentheses
+CERRWARN	+= -_gcc=-Wno-unused-label
+CERRWARN	+= $(CNOWARN_UNINIT)
 
 OBJS =		$(SRCS:%.c=%.o)