logging: Initialize 'chosen' pointer in z_log_msg_claim_oldest to NULL
Fixes a compiler warning 'chosen' may be uninitialized when later dereferenced Signed-off-by: Jacob McClellan <mcclellanjacob@meta.com>
This commit is contained in:
parent
f889c1abab
commit
39042dc9cc
|
@ -705,7 +705,7 @@ union log_msg_generic *z_log_msg_local_claim(void)
|
||||||
union log_msg_generic *z_log_msg_claim_oldest(k_timeout_t *backoff)
|
union log_msg_generic *z_log_msg_claim_oldest(k_timeout_t *backoff)
|
||||||
{
|
{
|
||||||
union log_msg_generic *msg = NULL;
|
union log_msg_generic *msg = NULL;
|
||||||
struct log_msg_ptr *chosen;
|
struct log_msg_ptr *chosen = NULL;
|
||||||
log_timestamp_t t_min = sizeof(log_timestamp_t) > sizeof(uint32_t) ?
|
log_timestamp_t t_min = sizeof(log_timestamp_t) > sizeof(uint32_t) ?
|
||||||
UINT64_MAX : UINT32_MAX;
|
UINT64_MAX : UINT32_MAX;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
Loading…
Reference in New Issue