ipc_service: backends: icbmsg: Silence maybe-uninitialized warning
If compiling with optimizations (-O2/-Ofast) gcc emits a maybe-uninitialized warning for `size`. As far as I can tell, `size` will always be initialized in the cases where it is used and only left uninitialized in error cases. Reproduced on main with the multi_endpoint sample on nrf5340dk/nrf5340/cpuapp. Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
This commit is contained in:
parent
d3cfbf1ae1
commit
9729651bb5
|
@ -461,7 +461,7 @@ static int release_tx_buffer(struct backend_data *dev_data, const uint8_t *buffe
|
|||
int new_size)
|
||||
{
|
||||
const struct icbmsg_config *conf = dev_data->conf;
|
||||
size_t size;
|
||||
size_t size = 0;
|
||||
int tx_block_index;
|
||||
|
||||
tx_block_index = buffer_to_index_validate(&conf->tx, buffer, &size);
|
||||
|
|
Loading…
Reference in a new issue