rahult-github opened a new pull request, #1686:
URL: https://github.com/apache/mynewt-nimble/pull/1686
When O2 optimization is enabled, below error is thrown . This patch fixes
the same.
nimble/host/src/ble_gattc.c: In function 'ble_gattc_find_inc_svcs_rx_adata':
nimble/host/src/ble_gattc.c:1982:25: note: 'service' declared here
1982 | struct ble_gatt_svc service;
| ^~~~~~~
In function 'ble_gattc_find_inc_svcs_cb',
inlined from 'ble_gattc_find_inc_svcs_rx_adata' at
nimble/host/src/ble_gattc.c:2031:16:
nimble/host/src/ble_gattc.c:1832:14: error: 'service' may be used
uninitialized [-Werror=maybe-uninitialized]
1832 | rc = proc->find_inc_svcs.cb(proc->conn_handle,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1833 | ble_gattc_error(status,
att_handle),
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1834 | service,
proc->find_inc_svcs.cb_arg);
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nimble/host/src/ble_gattc.c:1832:14: note: by argument 3 of type 'const
struct ble_gatt_svc *' to 'ble_gatt_disc_svc_fn' {aka 'int(short unsigned int,
const struct ble_gatt_error *, const struct ble_gatt_svc *, void *)'}
nimble/host/src/ble_gattc.c: In function 'ble_gattc_find_inc_svcs_rx_adata':
nimble/host/src/ble_gattc.c:1982:25: note: 'service' declared here
1982 | struct ble_gatt_svc service;
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]