← Commit list

fff36a360e

Viktor Szakats
Viktor Szakats
2025-10-03
FAILED Duration: 160s

Subject

checksrc: fix to handle `)` predecing a banned function

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

scripts/checksrc.pl+1 -0
@@ -908,6 +908,7 @@ sub scanfile {
$prefix =~ s/\[/\\[/;
$prefix =~ s/\]/\\]/;
$prefix =~ s/\(/\\(/;
+ $prefix =~ s/\)/\\)/;
$suff =~ s/\(/\\(/;
$l =~ s/$prefix$bad$suff/$prefix$replace/;
goto again;
tests/data/test1185+6 -2
@@ -75,6 +75,7 @@ void startfunc(int a, int b) {
if(a) b++;
if(sprintf(buffer, "%s", moo)) {}
+ *buffer_len = (ssize_t)alsobad((char *)buffer, NULL, 16);
// CPP comment ?
@@ -197,7 +198,10 @@ void startfunc(int a, int b) {
./%LOGDIR/code1185.c:59:5: warning: use of sprintf is banned (BANNEDFUNC)
if(sprintf(buffer, "%s", moo)) {}
^
-./%LOGDIR/code1185.c:61:2: warning: // comment (CPPCOMMENTS)
+./%LOGDIR/code1185.c:60:25: warning: use of alsobad is banned (BANNEDFUNC)
+ *buffer_len = (ssize_t)alsobad((char *)buffer, NULL, 16);
+ ^
+./%LOGDIR/code1185.c:62:2: warning: // comment (CPPCOMMENTS)
// CPP comment ?
^
./%LOGDIR/code1185.c:1:1: error: Missing copyright statement (COPYRIGHT)
@@ -206,7 +210,7 @@ void startfunc(int a, int b) {
./%LOGDIR/code1185.c:1:1: error: Missing closing comment (OPENCOMMENT)
^
-checksrc: 0 errors and 40 warnings
+checksrc: 0 errors and 41 warnings
</stdout>
<errorcode>
5