Message ID | 20240530150057.444585-5-hadess@hadess.net (mailing list archive) |
---|---|
State | Accepted |
Commit | c9fcea121f9ad8b9c36263ea6254158c8fa793c8 |
Headers | show |
Series | Fix a number of static analysis issues #3 | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | fail | WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search 4: B1 Line exceeds max length (94>80): "bluez-5.76/src/rfkill.c:101:3: tainted_data_argument: The value "event" is considered tainted." 5: B1 Line exceeds max length (88>80): "bluez-5.76/src/rfkill.c:105:3: tainted_data_argument: "event.idx" is considered tainted." 6: B1 Line exceeds max length (117>80): "bluez-5.76/src/rfkill.c:105:3: underflow: The cast of "event.idx" to a signed type could result in a negative number." 7: B3 Line contains hard tab characters (\t): "103| break;" 9: B3 Line contains hard tab characters (\t): "105|-> id = get_adapter_id_for_rfkill(event.idx);" 11: B3 Line contains hard tab characters (\t): "107| if (index == id) {" 14: B1 Line exceeds max length (94>80): "bluez-5.76/src/rfkill.c:133:2: tainted_data_argument: The value "event" is considered tainted." 15: B1 Line exceeds max length (88>80): "bluez-5.76/src/rfkill.c:143:2: tainted_data_argument: "event.idx" is considered tainted." 16: B1 Line exceeds max length (117>80): "bluez-5.76/src/rfkill.c:157:2: underflow: The cast of "event.idx" to a signed type could result in a negative number." 17: B3 Line contains hard tab characters (\t): "155| return TRUE;" 19: B3 Line contains hard tab characters (\t): "157|-> id = get_adapter_id_for_rfkill(event.idx);" 20: B3 Line contains hard tab characters (\t): "158| if (id < 0)" 21: B3 Line contains hard tab characters (\t): "159| return TRUE;" |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
diff --git a/src/rfkill.c b/src/rfkill.c index a0a50d9e45d9..8a0e48f01c4f 100644 --- a/src/rfkill.c +++ b/src/rfkill.c @@ -55,7 +55,7 @@ struct rfkill_event { }; #define RFKILL_EVENT_SIZE_V1 8 -static int get_adapter_id_for_rfkill(int rfkill_id) +static int get_adapter_id_for_rfkill(uint32_t rfkill_id) { char sysname[PATH_MAX]; int namefd;