Index: tools/scan-build/scan-build =================================================================== --- tools/scan-build/scan-build +++ tools/scan-build/scan-build @@ -523,7 +523,7 @@ die "No directory specified." if (!defined $Dir); if (! -d $Dir) { - Diag("No bugs found.\n"); + Diag("No bug found.\n"); return 0; } @@ -535,7 +535,7 @@ Diag("Removing directory '$Dir' because it contains no reports.\n"); rmtree($Dir) or die "Cannot rmtree '$Dir' : $!"; } - Diag("No bugs found.\n"); + Diag("No bug found.\n"); return 0; } @@ -866,7 +866,11 @@ print CalcStats(\@Stats) if $AnalyzerStats; my $Num = scalar(@Index); - Diag("$Num bugs found.\n"); + if ($Num == 1) { + Diag("$Num bug found.\n"); + } else { + Diag("$Num bugs found.\n"); + } if ($Num > 0 && -r "$Dir/index.html") { Diag("Run 'scan-view $Dir' to examine bug reports.\n"); }