checksrc: detect and remove space before trailing semicolons
This commit is contained in:
@@ -216,6 +216,11 @@ sub scanfile {
|
|||||||
checkwarn($line, length($1)+1, $file, $l, "missing space after close paren");
|
checkwarn($line, length($1)+1, $file, $l, "missing space after close paren");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check for space before the semicolon last in a line
|
||||||
|
if($l =~ /^(.*[^ ].*) ;$/) {
|
||||||
|
checkwarn($line, length($1), $file, $l, "space before last semicolon");
|
||||||
|
}
|
||||||
|
|
||||||
# scan for use of banned functions
|
# scan for use of banned functions
|
||||||
if($l =~ /^(.*\W)(sprintf|vsprintf|strcat|strncat|gets)\s*\(/) {
|
if($l =~ /^(.*\W)(sprintf|vsprintf|strcat|strncat|gets)\s*\(/) {
|
||||||
checkwarn($line, length($1), $file, $l,
|
checkwarn($line, length($1), $file, $l,
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
|
Reference in New Issue
Block a user