Message ID | 20240510091814.3172988-5-hadess@hadess.net (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Fix a number of static analysis issues | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | warning | WARNING:LONG_LINE_STRING: line length of 83 exceeds 80 columns #77: FILE: client/gatt.c:3202: + bt_shell_printf("Unable to update property value for %s\n", /github/workspace/src/src/13661168.patch total: 0 errors, 1 warnings, 16 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. /github/workspace/src/src/13661168.patch has style problems, please review. NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. |
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 (139>80): "bluez-5.75/client/gatt.c:3191:3: check_return: Calling "write_value" without checking return value (as is done elsewhere 5 out of 6 times)." 5: B1 Line exceeds max length (278>80): "bluez-5.75/client/gatt.c:2371:2: example_checked: Example 1: "write_value(&chrc->value_len, &chrc->value, value, value_len, aad->offset, chrc->max_val_len)" has its value checked in "write_value(&chrc->value_len, &chrc->value, value, value_len, aad->offset, chrc->max_val_len)"." 6: B1 Line exceeds max length (268>80): "bluez-5.75/client/gatt.c:2502:2: example_checked: Example 2: "write_value(&chrc->value_len, &chrc->value, value, value_len, offset, chrc->max_val_len)" has its value checked in "write_value(&chrc->value_len, &chrc->value, value, value_len, offset, chrc->max_val_len)"." 7: B1 Line exceeds max length (268>80): "bluez-5.75/client/gatt.c:2919:2: example_checked: Example 3: "write_value(&desc->value_len, &desc->value, value, value_len, offset, desc->max_val_len)" has its value checked in "write_value(&desc->value_len, &desc->value, value, value_len, offset, desc->max_val_len)"." 8: B1 Line exceeds max length (249>80): "bluez-5.75/client/gatt.c:759:3: example_checked: Example 4: "write_value(&c->value_len, &c->value, value, value_len, offset, c->max_val_len)" has its value checked in "write_value(&c->value_len, &c->value, value, value_len, offset, c->max_val_len)"." 9: B1 Line exceeds max length (249>80): "bluez-5.75/client/gatt.c:775:3: example_checked: Example 5: "write_value(&d->value_len, &d->value, value, value_len, offset, d->max_val_len)" has its value checked in "write_value(&d->value_len, &d->value, value, value_len, offset, d->max_val_len)"." 10: B3 Line contains hard tab characters (\t): "3189| }" 12: B3 Line contains hard tab characters (\t): "3191|-> write_value(&chrc->value_len, &chrc->value, value, len," 13: B3 Line contains hard tab characters (\t): "3192| 0, chrc->max_val_len);" |
tedd_an/IncrementalBuild | fail | [BlueZ,04/14] client/gatt: Check write_value() retval tools/mgmt-tester.c: In function ‘main’: tools/mgmt-tester.c:12725:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 12725 | int main(int argc, char *argv[]) | ^~~~ unit/test-avdtp.c: In function ‘main’: unit/test-avdtp.c:766:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 766 | int main(int argc, char *argv[]) | ^~~~ unit/test-avrcp.c: In function ‘main’: unit/test-avrcp.c:989:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 989 | int main(int argc, char *argv[]) | ^~~~ client/gatt.c: In function ‘proxy_property_changed’: client/gatt.c:3203:11: error: expected ‘;’ before ‘}’ token 3203 | name) | ^ | ; 3204 | } else { | ~ make[1]: *** [Makefile:7809: client/gatt.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:4651: all] Error 2 |
diff --git a/client/gatt.c b/client/gatt.c index 6c7603985172..51fa8ba8553c 100644 --- a/client/gatt.c +++ b/client/gatt.c @@ -3197,9 +3197,13 @@ static void proxy_property_changed(GDBusProxy *proxy, const char *name, dbus_message_iter_get_fixed_array(&array, &value, &len); } - write_value(&chrc->value_len, &chrc->value, value, len, - 0, chrc->max_val_len); - bt_shell_hexdump(value, len); + if (write_value(&chrc->value_len, &chrc->value, value, len, + 0, chrc->max_val_len)) { + bt_shell_printf("Unable to update property value for %s\n", + name) + } else { + bt_shell_hexdump(value, len); + } } g_dbus_emit_property_changed(conn, chrc->path, CHRC_INTERFACE, name);