Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin sbin: enable lint for almost all programs



details:   https://anonhg.NetBSD.org/src/rev/0b6bc931888e
branches:  trunk
changeset: 986233:0b6bc931888e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Sep 14 20:13:03 2021 +0000

description:
sbin: enable lint for almost all programs

The programs fsck_lfs and newfs_lfs both trigger a longstanding bug in
lint that is difficult to fix, so ignore them for now.

For resize_ffs, lint thinks that 'struct fs' is incomplete, but GCC and
Clang accept it.  Needs further investigation.

diffstat:

 sbin/Makefile.inc        |  6 +++++-
 sbin/fsck_lfs/Makefile   |  7 ++++++-
 sbin/newfs_lfs/Makefile  |  7 ++++++-
 sbin/resize_ffs/Makefile |  5 ++++-
 4 files changed, 21 insertions(+), 4 deletions(-)

diffs (72 lines):

diff -r 6739625f6685 -r 0b6bc931888e sbin/Makefile.inc
--- a/sbin/Makefile.inc Tue Sep 14 19:44:40 2021 +0000
+++ b/sbin/Makefile.inc Tue Sep 14 20:13:03 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.22 2012/03/21 05:47:53 matt Exp $
+#      $NetBSD: Makefile.inc,v 1.23 2021/09/14 20:13:03 rillig Exp $
 #      @(#)Makefile.inc        8.1 (Berkeley) 6/8/93
 
 .include <bsd.own.mk>          # for MKDYNAMICROOT definition
@@ -9,3 +9,7 @@
 .if (${MKDYNAMICROOT} == "no")
 LDSTATIC?=     -static
 .endif
+
+.if ${MKLINT} != "no" && ${LINT_SUPPORTED:Uyes} == "yes"
+realall: lint
+.endif
diff -r 6739625f6685 -r 0b6bc931888e sbin/fsck_lfs/Makefile
--- a/sbin/fsck_lfs/Makefile    Tue Sep 14 19:44:40 2021 +0000
+++ b/sbin/fsck_lfs/Makefile    Tue Sep 14 20:13:03 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.22 2020/09/07 03:19:04 mrg Exp $
+#      $NetBSD: Makefile,v 1.23 2021/09/14 20:13:03 rillig Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/5/93
 
 WARNS?=        3       # XXX: sign-compare issues
@@ -19,4 +19,9 @@
 LDADD+=-lutil
 DPADD+=${LIBUTIL}
 
+# As of 2021-09-14, lint does not recognize the types as equal, but it should.
+# vnode.c(104): error: redeclaration of register_vget [27]
+# vnode.h(75): previous declaration of register_vget [260]
+LINT_SUPPORTED=        no
+
 .include <bsd.prog.mk>
diff -r 6739625f6685 -r 0b6bc931888e sbin/newfs_lfs/Makefile
--- a/sbin/newfs_lfs/Makefile   Tue Sep 14 19:44:40 2021 +0000
+++ b/sbin/newfs_lfs/Makefile   Tue Sep 14 20:13:03 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.14 2020/09/07 03:09:53 mrg Exp $
+#      $NetBSD: Makefile,v 1.15 2021/09/14 20:13:03 rillig Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 WARNS?=        3       # XXX: sign-compare issues
@@ -25,4 +25,9 @@
 
 CPPFLAGS+=-I${FSCK_LFS} -I${FSCK} # -DNDEBUG # -DVERBOSE_BLOCKMAP
 
+# As of 2021-09-14, lint does not recognize the types as equal, but it should.
+# vnode.c(104): error: redeclaration of register_vget [27]
+# vnode.h(75): previous declaration of register_vget [260]
+LINT_SUPPORTED=        no
+
 .include <bsd.prog.mk>
diff -r 6739625f6685 -r 0b6bc931888e sbin/resize_ffs/Makefile
--- a/sbin/resize_ffs/Makefile  Tue Sep 14 19:44:40 2021 +0000
+++ b/sbin/resize_ffs/Makefile  Tue Sep 14 20:13:03 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.6 2020/05/24 14:41:26 jmcneill Exp $
+#      $NetBSD: Makefile,v 1.7 2021/09/14 20:13:03 rillig Exp $
 
 .include <bsd.own.mk>
 
@@ -14,4 +14,7 @@
 .PATH: ${NETBSDSRCDIR}/sys/ufs/ffs
 .PATH: ${NETBSDSRCDIR}/sbin/fsck
 
+# resize_ffs.c(90): error: cannot take size/alignment of incomplete type [143]
+LINT_SUPPORTED=        no
+
 .include <bsd.prog.mk>



Home | Main Index | Thread Index | Old Index