diff options
author | rillig <rillig> | 2006-02-13 17:50:40 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-02-13 17:50:40 +0000 |
commit | 1b29b08c906ba63e3e4ace7fd3ac16a39d086f51 (patch) | |
tree | 6ac0cee2903cbbc45a52ee0a2e24e21024e6d7cf /pkgtools | |
parent | 24d59222f6b6ab3d20ca40a84c2203b9168ca17f (diff) | |
download | pkgsrc-1b29b08c906ba63e3e4ace7fd3ac16a39d086f51.tar.gz |
Oops. The last change modified the behavior of an if-then-elsif chain in a
way that I didn't intend. Fixed.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 12 |
1 files changed, 7 insertions, 5 deletions
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}"); |