mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:53:37 +03:00
checksrc: detect curlx_safefree() opportunities
Follow-up tobcd0497c81#21700 Follow-up to1c3289c85e#21684 Follow-up toc0f0e400e0#5968 Follow-up to0f4a03cbb6Closes #21703
This commit is contained in:
parent
f2692b54f7
commit
419b1c0b75
3 changed files with 33 additions and 1 deletions
|
|
@ -91,6 +91,10 @@ void startfunc(int a, int b) {
|
|||
int d = impl->magicbad(1); /* member function always allowed */
|
||||
int e = impl.magicbad(); /* member function always allowed */
|
||||
|
||||
curlx_free(ptr); /* two line
|
||||
comment */
|
||||
ptr = NULL; /* comment more */
|
||||
|
||||
/* comment does not end
|
||||
|
||||
</file>
|
||||
|
|
@ -227,13 +231,16 @@ void startfunc(int a, int b) {
|
|||
./%LOGDIR/code1185.c:71:2: warning: // comment (CPPCOMMENTS)
|
||||
// CPP comment ?
|
||||
^
|
||||
./%LOGDIR/code1185.c:78:2: warning: replace curlx_free() + NULL assignment with curlx_safefree() (USESAFEFREE)
|
||||
ptr = NULL; /* more comment */
|
||||
^
|
||||
./%LOGDIR/code1185.c:1:1: error: Missing copyright statement (COPYRIGHT)
|
||||
%SP
|
||||
^
|
||||
./%LOGDIR/code1185.c:1:1: error: Missing closing comment (OPENCOMMENT)
|
||||
%SP
|
||||
^
|
||||
checksrc: 3 errors and 42 warnings
|
||||
checksrc: 3 errors and 43 warnings
|
||||
</stdout>
|
||||
<errorcode>
|
||||
5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue