|WARNING| pw153343 [PATCH v5 1/3] cmdline: use C standard library as number parser
checkpatch at dpdk.org
checkpatch at dpdk.org
Wed May 7 17:23:38 CEST 2025
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/153343
_coding style issues_
WARNING:BRACES: braces {} are not necessary for any arm of this statement
#277: FILE: lib/cmdline/cmdline_parse_num.c:168:
+ if (c == '0') {
[...]
- else if (c >= '1' && c <= '9') {
[...]
ERROR:ELSE_AFTER_BRACE: else should follow close brace '}'
#287: FILE: lib/cmdline/cmdline_parse_num.c:171:
}
+ else {
WARNING:BRACES: braces {} are not necessary for single statement blocks
#287: FILE: lib/cmdline/cmdline_parse_num.c:171:
+ else {
st = ERROR;
}
WARNING:BRACES: braces {} are not necessary for any arm of this statement
#297: FILE: lib/cmdline/cmdline_parse_num.c:177:
+ if (c == 'b') {
[...]
- else if (c >= '0' && c <= '7') {
[...]
WARNING:TYPO_SPELLING: 'ressize' may be misspelled - perhaps 'resize'?
#441: FILE: lib/cmdline/cmdline_parse_num.c:223:
+ unsigned ressize)
WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#441: FILE: lib/cmdline/cmdline_parse_num.c:223:
+ unsigned ressize)
WARNING:TYPO_SPELLING: 'ressize' may be misspelled - perhaps 'resize'?
#455: FILE: lib/cmdline/cmdline_parse_num.c:237:
+ if (check_res_size(&nd, ressize) < 0)
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#505: FILE: lib/cmdline/cmdline_parse_num.c:267:
+ if (res) *(uint8_t *)res = (uint8_t)uintres;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#508: FILE: lib/cmdline/cmdline_parse_num.c:270:
+ if (res) *(uint16_t *)res = (uint16_t)uintres;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#511: FILE: lib/cmdline/cmdline_parse_num.c:273:
+ if (res) *(uint32_t *)res = (uint32_t)uintres;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#514: FILE: lib/cmdline/cmdline_parse_num.c:276:
+ if (res) *(uint64_t *)res = uintres;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#517: FILE: lib/cmdline/cmdline_parse_num.c:279:
+ if (res) *(int8_t *)res = (int8_t)uintres;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#520: FILE: lib/cmdline/cmdline_parse_num.c:282:
+ if (res) *(int16_t *)res = (int16_t)uintres;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#523: FILE: lib/cmdline/cmdline_parse_num.c:285:
+ if (res) *(int32_t *)res = (int32_t)uintres;
ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#526: FILE: lib/cmdline/cmdline_parse_num.c:288:
+ if (res) *(int64_t *)res = (int64_t)uintres;
total: 9 errors, 6 warnings, 432 lines checked
More information about the test-report
mailing list