Message ID | 20220921215342.2263924-1-luiz.dentz@gmail.com |
---|---|
State | New |
Headers | show |
Series | [BlueZ] shared/gatt-db: Fix scan-build warning | expand |
diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c index 32cbf6cdc38b..ff2502ff9681 100644 --- a/src/shared/gatt-db.c +++ b/src/shared/gatt-db.c @@ -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;
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> 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(+)