diff --git a/usr.bin/xlint/Makefile.inc b/usr.bin/xlint/Makefile.inc index f6e70f861dee..3a9839742601 100644 --- a/usr.bin/xlint/Makefile.inc +++ b/usr.bin/xlint/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.23 2022/04/10 13:21:34 martin Exp $ +# $NetBSD: Makefile.inc,v 1.24 2023/07/08 11:18:16 rillig Exp $ .include @@ -27,4 +27,7 @@ CFLAGS+= ${ACTIVE_CC:Mgcc:%=-ftrapv} .include "${.CURDIR}/../../Makefile.inc" .endif +LINTFLAGS+= -aa # warn about all lossy conversions +LINTFLAGS+= -e # strict enum mode +LINTFLAGS+= -T # strict bool mode LINTFLAGS+= -w # treat warnings as errors diff --git a/usr.bin/xlint/lint1/Makefile b/usr.bin/xlint/lint1/Makefile index 57bb46816d47..2f958fd73288 100644 --- a/usr.bin/xlint/lint1/Makefile +++ b/usr.bin/xlint/lint1/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.96 2023/07/05 11:42:14 rillig Exp $ +# $NetBSD: Makefile,v 1.97 2023/07/08 11:18:16 rillig Exp $ .include @@ -16,7 +16,6 @@ YHEADER= #LFLAGS+= -d CWARNFLAGS.clang+= -Wno-error=implicit-int-float-conversion -LINTFLAGS+= -T LOBJS.${PROG}+= ${SRCS:M*.y:.y=.ln} LOBJS.${PROG}+= ${SRCS:M*.l:.l=.ln} LINTFLAGS.cgram.c+= -X 351 # 'extern' declaration in .c file diff --git a/usr.bin/xlint/lint2/read.c b/usr.bin/xlint/lint2/read.c index 5554cd3b3220..c0fe100d5676 100644 --- a/usr.bin/xlint/lint2/read.c +++ b/usr.bin/xlint/lint2/read.c @@ -1,4 +1,4 @@ -/* $NetBSD: read.c,v 1.82 2023/07/03 07:03:19 rillig Exp $ */ +/* $NetBSD: read.c,v 1.83 2023/07/08 11:18:16 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: read.c,v 1.82 2023/07/03 07:03:19 rillig Exp $"); +__RCSID("$NetBSD: read.c,v 1.83 2023/07/08 11:18:16 rillig Exp $"); #endif #include @@ -732,7 +732,7 @@ inptype(const char *cp, const char **epp) tp->t_uniqpos.p_line = parse_int(&cp); cp++; /* xlate to 'global' file name. */ - tp->t_uniqpos.p_file = + tp->t_uniqpos.p_file = (short) addoutfile(inpfns[parse_int(&cp)]); cp++; tp->t_uniqpos.p_uniq = parse_int(&cp); @@ -973,7 +973,7 @@ storetyp(type_t *tp, const char *cp, size_t len, int h) thte = xalloc(sizeof(*thte)); thte->th_name = name; - thte->th_idx = tidx; + thte->th_idx = (unsigned short)tidx; thte->th_next = thtab[h]; thtab[h] = thte;