summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2015-05-04 14:17:28 -0400
committerDan McDonald <danmcd@omniti.com>2015-05-05 12:02:29 -0400
commit37bbd7cc85ebfd31fbf68569b8b098e5448c9ce9 (patch)
tree553680f7cca62f4b4f4cfecdc71e74b2ced08a90 /usr/src
parentf949c3862e64cd157f2a1aeefd0da08100f76173 (diff)
downloadillumos-gate-37bbd7cc85ebfd31fbf68569b8b098e5448c9ce9.tar.gz
5878 Additional lint fixes for sunstudio12.1 and more modern OpenSSL
Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/Makefile1
-rw-r--r--usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/Makefile1
-rw-r--r--usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com5
-rw-r--r--usr/src/lib/libkmf/plugins/kmf_openssl/common/openssl_spi.c2
-rw-r--r--usr/src/lib/libpkg/Makefile.com2
-rw-r--r--usr/src/lib/libwanboot/Makefile.com6
6 files changed, 13 insertions, 4 deletions
diff --git a/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/Makefile b/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/Makefile
index e93209c9b6..f855d268c1 100644
--- a/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/Makefile
@@ -27,6 +27,7 @@ include ../Makefile.com
PROG= p12split
LDLIBS += -lwanboot -linetutil -lwanbootutil -lcrypto
CPPFLAGS += -I$(CMNCRYPTDIR)
+LINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
all: $(PROG)
diff --git a/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/Makefile b/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/Makefile
index f4a1f548b7..16e3eb8261 100644
--- a/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.lib/wanboot/wanboot-cgi/Makefile
@@ -27,6 +27,7 @@ include ../Makefile.com
PROG = wanboot-cgi
LDLIBS += -lgen -lnsl -lwanbootutil -lnvpair -lwanboot -lcrypto
CPPFLAGS += -I$(CMNCRYPTDIR)
+LINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
all: $(PROG)
diff --git a/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com b/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com
index 76ecd38479..9557d11286 100644
--- a/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com
+++ b/usr/src/lib/libkmf/plugins/kmf_openssl/Makefile.com
@@ -43,6 +43,11 @@ OPENSSLLIBS64= $(BERLIB64) -lcrypto -lcryptoutil -lc
LINTSSLLIBS = $(BERLIB) -lcrypto -lcryptoutil -lc
LINTSSLLIBS64 = $(BERLIB64) -lcrypto -lcryptoutil -lc
+# Because of varying openssl implementations, we need to not have lint
+# complain if we're being liberal in our suppression directives.
+LINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
+LINTFLAGS64 += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
+
SRCDIR= ../common
INCDIR= ../../include
diff --git a/usr/src/lib/libkmf/plugins/kmf_openssl/common/openssl_spi.c b/usr/src/lib/libkmf/plugins/kmf_openssl/common/openssl_spi.c
index 0786a26e8b..1c85c33dc8 100644
--- a/usr/src/lib/libkmf/plugins/kmf_openssl/common/openssl_spi.c
+++ b/usr/src/lib/libkmf/plugins/kmf_openssl/common/openssl_spi.c
@@ -3778,7 +3778,7 @@ set_pkey_attrib(EVP_PKEY *pkey, ASN1_TYPE *attrib, int nid)
if (OBJ_obj2nid(a->object) == nid) {
X509_ATTRIBUTE_free(a);
/* LINTED E_BAD_PTR_CAST_ALIGN */
- sk_X509_ATTRIBUTE_set(pkey->attributes,
+ (void) sk_X509_ATTRIBUTE_set(pkey->attributes,
i, attr);
return (KMF_OK);
}
diff --git a/usr/src/lib/libpkg/Makefile.com b/usr/src/lib/libpkg/Makefile.com
index 8f56a61423..3e3b294c7e 100644
--- a/usr/src/lib/libpkg/Makefile.com
+++ b/usr/src/lib/libpkg/Makefile.com
@@ -58,6 +58,8 @@ CLEANFILES += $(MSGFILES)
# use of macros for stack management.
LINTFLAGS= -umx -errtags \
-erroff=E_BAD_PTR_CAST_ALIGN,E_BAD_PTR_CAST
+LINTFLAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
+LINTFLAGS64 += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libwanboot/Makefile.com b/usr/src/lib/libwanboot/Makefile.com
index ed69ec0b8a..322bfb51f7 100644
--- a/usr/src/lib/libwanboot/Makefile.com
+++ b/usr/src/lib/libwanboot/Makefile.com
@@ -75,9 +75,9 @@ SRCS = $(LOC_SRCS) $(COM_SRCS) $(DHCP_SRCS)
SRCDIR = $(LOC_DIR)
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
-# OpenSSL requires us to turn this off
-LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
-LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN
+# OpenSSL (incl. varying versions) requires us to turn these off
+LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN,E_SUPPRESSION_DIRECTIVE_UNUSED
+LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN,E_SUPPRESSION_DIRECTIVE_UNUSED
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(LOC_DIR) -I$(COM_DIR) -I$(DHCP_DIR)