lkml.org 
[lkml]   [2014]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] scripts: checkpatch.pl: Fix existing typedef false positive warning
On Sun, Sep 21, 2014 at 9:31 PM, Joe Perches <joe@perches.com> wrote:
> On Sun, 2014-09-21 at 20:32 -0500, Greg Donald wrote:
>> Fixing an "open brace '{' following struct go on the same line" error causes a
>> false positive warning "do not add new typedefs". Fix existing typedef false
>> positive warning.
>
> This doesn't work.
> The matching deleted line can be any number of lines above.

But this fixes the most common case:

-typedef struct ksock_proto
-{
+typedef struct ksock_proto {

If you're wanting to check more than just $rawlines[$linenr - 3], how
far above does it make sense to go? From what I'm seeing the '{' is
usually on the next line.


--
Greg Donald


\
 
 \ /
  Last update: 2014-09-22 05:41    [W:0.052 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site