mirror of
https://github.com/curl/curl.git
synced 2026-07-30 12:28:04 +03:00
checksrc: add missing semicolon, fix IFDEFSINGLE capture group
Pointed out by GitHub Code Quality Closes #21435
This commit is contained in:
parent
2f37943406
commit
0d3d9f2222
2 changed files with 6 additions and 6 deletions
|
|
@ -554,7 +554,7 @@ sub scanfile {
|
|||
# check for !checksrc! commands
|
||||
if($l =~ /\!checksrc\! (.*)/) {
|
||||
my $cmd = $1;
|
||||
checksrc($cmd, $line, $file, $l)
|
||||
checksrc($cmd, $line, $file, $l);
|
||||
}
|
||||
|
||||
if($l =~ /^#line (\d+) \"([^\"]*)\"/) {
|
||||
|
|
@ -670,7 +670,7 @@ sub scanfile {
|
|||
$line, length($1), $file, $l, "\/\/ comment");
|
||||
}
|
||||
|
||||
if($l =~ /^\s*#\s*if\s+!?\s*defined\([a-zA-Z0-9_]+\)$/) {
|
||||
if($l =~ /^(\s*#\s*if\s+!?\s*defined\()[a-zA-Z0-9_]+\)$/) {
|
||||
checkwarn("IFDEFSINGLE",
|
||||
$line, length($1), $file, $l, "use ifdef/ifndef for single macro checks");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,12 +215,12 @@ void startfunc(int a, int b) {
|
|||
./%LOGDIR/code1185.c:62:25: warning: use of alsobad is banned (BANNEDFUNC)
|
||||
*buffer_len = (ssize_t)alsobad((char *)buffer, NULL, 16);
|
||||
^
|
||||
./%LOGDIR/code1185.c:64:1: warning: use ifdef/ifndef for single macro checks (IFDEFSINGLE)
|
||||
./%LOGDIR/code1185.c:64:14: warning: use ifdef/ifndef for single macro checks (IFDEFSINGLE)
|
||||
# if defined(SINGLE_MACRO)
|
||||
^
|
||||
./%LOGDIR/code1185.c:65:1: warning: use ifdef/ifndef for single macro checks (IFDEFSINGLE)
|
||||
^
|
||||
./%LOGDIR/code1185.c:65:17: warning: use ifdef/ifndef for single macro checks (IFDEFSINGLE)
|
||||
#if ! defined(__macro_10)
|
||||
^
|
||||
^
|
||||
./%LOGDIR/code1185.c:65:1: warning: space before preprocessor hash (CPPSPACE)
|
||||
#if ! defined(__macro_10)
|
||||
^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue