From kde-commits Tue Sep 30 23:36:44 2008 From: Allen Winter Date: Tue, 30 Sep 2008 23:36:44 +0000 To: kde-commits Subject: quality/krazy2/plugins/c++ Message-Id: <1222817804.670233.9980.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122281781408073 SVN commit 866473 by winterz: eliminate a couple of false positives, as reported by klebezettel CCMAIL: klebezettel@gmx.net M +2 -2 foreach M +6 -2 syscalls --- trunk/quality/krazy2/plugins/c++/foreach #866472:866473 @@ -44,7 +44,7 @@ use Krazy::Utils; my($Prog) = "foreach"; -my($Version) = "1.1"; +my($Version) = "1.2"; &parseArgs(); @@ -95,7 +95,7 @@ # see if the iterator variable is declared a pointer a couple lines above if ($line =~ m/(foreach|Q_FOREACH)\s*\(\s*(\w+)\s*,/) { my($pat) = "\\s*\\*\\s*" . $2 . "\\s*"; - next if(&searchBack($pat,$linecnt,10)); + next if(&searchBack($pat,$linecnt,12)); } $cnt++; --- trunk/quality/krazy2/plugins/c++/syscalls #866472:866473 @@ -45,7 +45,7 @@ use Krazy::Utils; my($Prog) = "syscalls"; -my($Version) = "1.2"; +my($Version) = "1.3"; &parseArgs(); @@ -150,7 +150,11 @@ if ($l =~ m/[\(,;=:]\s*$syscall[[:space:]]*\(/ || $l =~ m/^\s*$syscall[[:space:]]*\(/) { if ($l !~ m/[[:alnum:]]::$syscall/ && $l !~ m/SIGNAL/ && $l !~ m/emit/ && - $l !~ m/open.*\"\s*\)/ && $l !~ m/close\s*\(\s*\"/) { + $l !~ m/open.*\"\s*\)/ && $l !~ m/close\s*\(\s*\"/ && + $l !~ m/open\s*\(\s*[Ff][Aa][Ll][Ss][Ee]\s*\)/ && + $l !~ m/open\s*\(\s*[Tt][Rr][Uu][Ee]\s*\)/ && + $l !~ m/close\s*\(\s*[Ff][Aa][Ll][Ss][Ee]\s*\)/ && + $l !~ m/close\s*\(\s*[Tt][Rr][Uu][Ee]\s*\)/) { return 1; } } else {