From 055eed4044ab266d0e73e06e50a4cf5dc95af663 Mon Sep 17 00:00:00 2001 From: rillig Date: Mon, 13 Feb 2006 17:50:40 +0000 Subject: Oops. The last change modified the behavior of an if-then-elsif chain in a way that I didn't intend. Fixed. --- pkgtools/pkglint/files/pkglint.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index a0846adcf2a..c07e25345b0 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.514 2006/02/13 15:37:49 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.515 2006/02/13 17:50:40 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -3138,10 +3138,12 @@ sub checkline_mk_vartype($$$$$) { $guessed = true; } - if (!defined($type) || $guessed) { - if ($varname !~ qr"_MK$") { - $opt_debug and $line->log_warning("[checkline_mk_vartype] Untyped variable ${varname}."); - } + if ((!defined($type) || $guessed) && $varname !~ qr"^_MK$") { + $opt_debug and $line->log_warning("[checkline_mk_vartype] Untyped variable ${varname}."); + } + + if (!defined($type)) { + # Cannot check anything if the type is not known. } elsif ($op eq "!=") { $opt_debug and $line->log_info("Use of !=: ${value}"); -- cgit v1.2.3