Module Name:    src
Committed By:   rillig
Date:           Mon Jan  6 19:11:26 UTC 2025

Modified Files:
        src/crypto: Makefile.openssl
        src/crypto/external/bsd/openssl/lib/libapps: Makefile
        src/crypto/external/bsd/openssl/lib/libcrypto: bn.inc
        src/crypto/external/bsd/openssl/lib/libdes: Makefile

Log Message:
openssl: suppress the most common lint warnings

There are many places where 'long' is narrowed to 'int', so if these had
serious problems, these would have probably been found earlier. Suppress
these warnings to make the remaining ones more visible, as these may
point to more interesting places in the code.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/crypto/Makefile.openssl
cvs rdiff -u -r1.7 -r1.8 src/crypto/external/bsd/openssl/lib/libapps/Makefile
cvs rdiff -u -r1.10 -r1.11 \
    src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/openssl/lib/libdes/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/Makefile.openssl
diff -u src/crypto/Makefile.openssl:1.19 src/crypto/Makefile.openssl:1.20
--- src/crypto/Makefile.openssl:1.19	Thu May 25 19:12:51 2023
+++ src/crypto/Makefile.openssl	Mon Jan  6 19:11:26 2025
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.openssl,v 1.19 2023/05/25 19:12:51 riastradh Exp $
+#	$NetBSD: Makefile.openssl,v 1.20 2025/01/06 19:11:26 rillig Exp $
 
 .ifndef _MAKEFILE_OPENSSL_INCLUDED
 _MAKEFILE_OPENSSL_INCLUDED=1
@@ -25,12 +25,15 @@ CWARNFLAGS.clang+= -Wno-implicit-int-flo
 # XXX: This warning seems to trigger incorrectly
 CWARNFLAGS.clang+=	-Wno-atomic-alignment
 
-LINTFLAGS+=	-X 161	# constant in conditional context
-LINTFLAGS+=	-X 129	# expression has null effect
 LINTFLAGS+=	-X 117	# bitwise '>>' on signed value possibly nonportable
-LINTFLAGS+=	-X 231	# argument '%s' unused in function '%s'
+LINTFLAGS+=	-X 129	# expression has null effect
+LINTFLAGS+=	-X 132	# conversion may lose accuracy
+LINTFLAGS+=	-X 161	# constant in conditional context
 LINTFLAGS+=	-X 220	# fallthrough on case statement
-LINTFLAGS+=	-X 118	# semantics of '%s' change in ANSI C; use explicit cast
+LINTFLAGS+=	-X 231	# argument unused in function
+LINTFLAGS+=	-X 309	# (unsigned int)0x80000000 & (unsigned long)x
+LINTFLAGS+=	-X 275	# cast discards 'const' from pointer
+LINTFLAGS+=	-X 298	# argument conversion may lose accuracy
 
 
 .if ${HAVE_OPENSSL} <= 11

Index: src/crypto/external/bsd/openssl/lib/libapps/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.7 src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.8
--- src/crypto/external/bsd/openssl/lib/libapps/Makefile:1.7	Sun Jul 21 08:43:57 2024
+++ src/crypto/external/bsd/openssl/lib/libapps/Makefile	Mon Jan  6 19:11:26 2025
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2024/07/21 08:43:57 rillig Exp $
+#	$NetBSD: Makefile,v 1.8 2025/01/06 19:11:26 rillig Exp $
 
 # RCSid:
 #	Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@@ -32,7 +32,6 @@ CPPFLAGS+= -I${OPENSSLSRC}/crypto/modes
 CPPFLAGS+= -I${OPENSSLSRC}/../include
 CPPFLAGS+= -I${OPENSSLSRC}/apps/lib
 CPPFLAGS+= -I${OPENSSLSRC}/apps/include
-LINTFLAGS+=	-X 309	# (unsigned int)0x80000000 & (unsigned long)x
 
 CRYPTODIST=	${NETBSDSRCDIR}/crypto
 OPENSSLINC=	${OPENSSLSRC}/include/openssl

Index: src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc:1.10 src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc:1.11
--- src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc:1.10	Wed May 31 20:57:31 2023
+++ src/crypto/external/bsd/openssl/lib/libcrypto/bn.inc	Mon Jan  6 19:11:26 2025
@@ -1,4 +1,4 @@
-#	$NetBSD: bn.inc,v 1.10 2023/05/31 20:57:31 christos Exp $
+#	$NetBSD: bn.inc,v 1.11 2025/01/06 19:11:26 rillig Exp $
 
 .PATH:	${OPENSSLSRC}/crypto/bn
 
@@ -45,8 +45,3 @@ SRCS += ${BN_SRCS}
 .for cryptosrc in ${BN_SRCS}
 CPPFLAGS.${cryptosrc} += -I${OPENSSLSRC}/crypto/bn ${BNCPPFLAGS}
 .endfor
-
-
-LINTFLAGS.bn_nist.c+=	-X 132	# conversion from 'unsigned long' to 'int'
-LINTFLAGS.bn_nist.c+=	-X 161	# constant in conditional context
-LINTFLAGS.bn_nist.c+=	-X 275	# cast discards 'const' from type 'pointer to const unsigned long'

Index: src/crypto/external/bsd/openssl/lib/libdes/Makefile
diff -u src/crypto/external/bsd/openssl/lib/libdes/Makefile:1.4 src/crypto/external/bsd/openssl/lib/libdes/Makefile:1.5
--- src/crypto/external/bsd/openssl/lib/libdes/Makefile:1.4	Sun Aug 15 12:58:01 2021
+++ src/crypto/external/bsd/openssl/lib/libdes/Makefile	Mon Jan  6 19:11:26 2025
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2021/08/15 12:58:01 rillig Exp $
+#	$NetBSD: Makefile,v 1.5 2025/01/06 19:11:26 rillig Exp $
 
 .include <bsd.own.mk>
 
@@ -16,9 +16,6 @@ SRCS+=	ornd_keys.c
 
 CPPFLAGS+=-DOPENSSL_VERSION_PTEXT="\" based on OpenSSL 0.9.6j 10 Apr 2003\""
 CPPFLAGS+=-DOPENSSL_cleanse=bzero -DOPENSSL_malloc=malloc
-LINTFLAGS+=	-X 117	# bitwise '>>' on signed value possibly nonportable
-LINTFLAGS+=	-X 132	# conversion from 'long' to 'unsigned int'
-LINTFLAGS+=	-X 220	# fallthrough on case statement
 
 INCS=	des.h
 INCSDIR=/usr/include

Reply via email to