Closed
Description
fmtscan
introduced in #254 cannot pass the static analysis.
tools/fmtscan.c:659:29: style: The scope of the variable 'nextch2' can be reduced. [variableScope]
get_char_t nextch1, nextch2;
^
tools/fmtscan.c:362:11: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer]
char *ptr, *dict;
^
tools/fmtscan.c:1071:55: style: Parameter 'p' can be declared as pointer to const. However it seems that 'parse_eof' is a callback function, if 'p' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
static inline get_char_t parse_eof(parser_t *restrict p UNUSED,
^
tools/fmtscan.c:1190:20: note: You might need to cast the function pointer here
[PARSER_EOF] = parse_eof,
^
tools/fmtscan.c:1071:55: note: Parameter 'p' can be declared as pointer to const
static inline get_char_t parse_eof(parser_t *restrict p UNUSED,
^
tools/fmtscan.c:1072:54: style: Parameter 't' can be declared as pointer to const. However it seems that 'parse_eof' is a callback function, if 't' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
token_t *restrict t UNUSED,
^
tools/fmtscan.c:1190:20: note: You might need to cast the function pointer here
[PARSER_EOF] = parse_eof,
^
tools/fmtscan.c:1072:54: note: Parameter 't' can be declared as pointer to const
token_t *restrict t UNUSED,
^
Metadata
Metadata
Assignees
Labels
No labels