shared/gatt-db: Fix scan-build warning
Luiz Augusto von Dentz
maintainerPATCH 1/1 shared/gatt-db: Fix scan-build warning
From: Luiz Augusto von Dentz <[email protected]>
This fixes the following warning:
src/shared/gatt-db.c:1339:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn]
return data.num_of_res;
^~~~~~~~~~~~~~~~~~~~~~
---
src/shared/gatt-db.c | 1 +
1 file changed, 1 insertion(+)src/shared/gatt-db.c +1 -0
@@ -1328,6 +1328,7 @@ unsigned int gatt_db_find_by_type_value(struct gatt_db *db, {struct find_by_type_value_data data; +memset (&data,0 ,sizeof (data)); data.func = func; data.user_data = user_data; data.value = value;
Signature · 1 line
2.37.3
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=679177
---Test result---
Test Summary:
CheckPatch PASS 1.45 seconds GitLint PASS 1.14 seconds Prep - Setup ELL PASS 28.57 seconds Build - Prep PASS 0.86 seconds Build - Configure PASS 9.10 seconds Build - Make PASS 1056.77 seconds Make Check PASS 12.48 seconds Make Check w/Valgrind PASS 306.51 seconds Make Distcheck PASS 260.10 seconds Build w/ext ELL - Configure PASS 9.34 seconds Build w/ext ELL - Make PASS 91.15 seconds Incremental Build w/ patches PASS 0.00 seconds Scan Build WARNING 592.37 seconds
Details
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************src/shared/gatt-db.c:725:5: warning: Access to field 'handle' results in a dereference of a null pointer
service->attributes[0]->handle == handle)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1 warning generated.
---
Regards,
Linux Bluetooth