Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217597
b: refs/heads/master
c: cb710ec
h: refs/heads/master
i:
  217595: 72237cf
v: v3
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Oct 26, 2010
1 parent df30ac0 commit 749f2e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 267ad8f42644c2fa4ff6c2e7596d2b02c7397c85
refs/heads/master: cb710eca6820493add0ddd3d7e8e3ee53f2b6e57
12 changes: 12 additions & 0 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,18 @@ sub process {
$herecurr);
}

# check for static const char * arrays.
if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
WARN("static const char * array should probably be static const char * const\n" .
$herecurr);
}

# check for static char foo[] = "bar" declarations.
if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
WARN("static char array declaration should probably be static const char\n" .
$herecurr);
}

# check for new typedefs, only function parameters and sparse annotations
# make sense.
if ($line =~ /\btypedef\s/ &&
Expand Down

0 comments on commit 749f2e5

Please sign in to comment.