mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:03:33 +03:00
checksrc: fix SPACEBEFOREPAREN for conditions starting with "*"
The open paren check wants to warn for spaces before open parenthesis for if/while/for but also for any function call. In order to avoid catching function pointer declarations, the logic allows a space if the first character after the open parenthesis is an asterisk. I also spotted what we did not include "switch" in the check but we should. This check is a little lame, but we reduce this problem by not allowing that space for if/while/for/switch. Reported-by: Emanuele Torre Closes #11044
This commit is contained in:
parent
4578ada4a0
commit
d567cca1de
14 changed files with 22 additions and 20 deletions
|
|
@ -400,7 +400,7 @@ static int dprintf_Pass1(const char *format, struct va_stack *vto,
|
|||
/* out of allowed range */
|
||||
return 1;
|
||||
|
||||
switch (*fmt) {
|
||||
switch(*fmt) {
|
||||
case 'S':
|
||||
flags |= FLAGS_ALT;
|
||||
/* FALLTHROUGH */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue