Message ID | 20240710183006.26549-1-rahul@sandhuservices.dev (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [BlueZ,v3] tools/hex2hcd: fix musl compatibility | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/BuildEll | success | Build ELL PASS |
tedd_an/BluezMake | success | Bluez Make PASS |
tedd_an/MakeCheck | success | Bluez Make Check PASS |
tedd_an/MakeDistcheck | success | Make Distcheck PASS |
tedd_an/CheckValgrind | success | Check Valgrind PASS |
tedd_an/CheckSmatch | warning | CheckSparse WARNING tools/hex2hcd.c:135:26: warning: Variable length array is used. |
tedd_an/bluezmakeextell | success | Make External ELL PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
tedd_an/ScanBuild | success | Scan Build PASS |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=870206 ---Test result--- Test Summary: CheckPatch PASS 0.48 seconds GitLint PASS 0.33 seconds BuildEll PASS 25.03 seconds BluezMake PASS 1762.86 seconds MakeCheck PASS 13.34 seconds MakeDistcheck PASS 179.83 seconds CheckValgrind PASS 254.74 seconds CheckSmatch WARNING 360.47 seconds bluezmakeextell PASS 120.97 seconds IncrementalBuild PASS 1489.59 seconds ScanBuild PASS 1014.26 seconds Details ############################## Test: CheckSmatch - WARNING Desc: Run smatch tool with source Output: tools/hex2hcd.c:135:26: warning: Variable length array is used. --- Regards, Linux Bluetooth
diff --git a/tools/hex2hcd.c b/tools/hex2hcd.c index e6dca5a81..28f0e8be2 100644 --- a/tools/hex2hcd.c +++ b/tools/hex2hcd.c @@ -285,6 +285,13 @@ static void ver_parse_file(const char *pathname) prev->next = ver; } +static const char *helper_basename(const char *path) +{ + const char *base = strrchr(path, '/'); + + return base ? base + 1 : path; +} + static void ver_parse_entry(const char *pathname) { struct stat st; @@ -302,7 +309,7 @@ static void ver_parse_entry(const char *pathname) } if (S_ISREG(st.st_mode)) { - ver_parse_file(basename(pathname)); + ver_parse_file(helper_basename(pathname)); goto done; }