[PATCH] fix minor problems in checkpatch.pl-next

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: Andy Whitcroft <apw@...>, Erez Zadok <ezk@...>, Ingo Molnar <mingo@...>
Date: Thursday, October 11, 2007 - 8:28 am

When forming the prefix to output error msgs in gnu gcc format, the
lack of a type ($ or @) when referencing ARGV causes error messages.

When invoked to check source files, the linenumber was off by +3 in
the gcc format output.

Signed-off-by: Mike D. Day <ncmike@ncultra.org>

--- checkpatch.pl-next	2007-10-11 07:28:41.000000000 -0400
+++ /home/mdday/bin/checkpatch	2007-10-11 08:16:07.000000000 -0400
@@ -452,7 +452,6 @@
 
 		my $rawline = $line;
 
-		$prefix = "ARGV:$linenr: " if ($emacs);
 
 #extract the filename as it passes
 		if ($line=~/^\+\+\+\s+(\S+)/) {
@@ -517,6 +516,9 @@
 		my $herecurr = "$here\n$line\n";
 		my $hereprev = "$here\n$prevline\n$line\n";
 
+		$prefix = "@ARGV:$realline: " if ($emacs && $file);
+		$prefix = "@ARGV:$linenr: " if ($emacs && !$file);
+
 #check the patch for a signoff:
 		if ($line =~ /^\s*signed-off-by:/i) {
 			# This is a signoff, if ugly, so do not double report.

-- 
Mike Day
http://www.ncultra.org
AIM: ncmikeday |  Yahoo IM: ultra.runner
PGP key: http://www.ncultra.org/ncmike/pubkey.asc
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] fix minor problems in checkpatch.pl-next, Mike D. Day, (Thu Oct 11, 8:28 am)
Re: [PATCH] fix minor problems in checkpatch.pl-next, Andy Whitcroft, (Thu Oct 11, 10:32 am)
Re: fix minor problems in checkpatch.pl-next, Mike D. Day, (Thu Oct 11, 11:57 am)