mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-13 12:40:01 +00:00
nimble/host: Fix compilation error when asserts are disabled
/home/nimble/host/services/gap/src/ble_svc_gap.c:195:9:
error: 'rc' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
int rc;
^
This commit is contained in:
committed by
Szymon Janc
parent
b0e723fa37
commit
d5ede9c755
@@ -205,6 +205,7 @@ ble_svc_gap_access(uint16_t conn_handle, uint16_t attr_handle,
|
||||
rc = ble_svc_gap_device_name_write_access(ctxt);
|
||||
} else {
|
||||
assert(0);
|
||||
rc = BLE_ATT_ERR_UNLIKELY;
|
||||
}
|
||||
return rc;
|
||||
|
||||
@@ -215,6 +216,7 @@ ble_svc_gap_access(uint16_t conn_handle, uint16_t attr_handle,
|
||||
rc = ble_svc_gap_appearance_write_access(ctxt);
|
||||
} else {
|
||||
assert(0);
|
||||
rc = BLE_ATT_ERR_UNLIKELY;
|
||||
}
|
||||
return rc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user