Skip to content

Commit 7dbf111

Browse files
trantanenbjarki-andreasen
authored andcommitted
[nrf fromlist] net: lib: coap: Initialize response_truncated
Fix the following compilation warning given when using newlibc: warning: 'response_truncated' may be used uninitialized [-Wmaybe-uninitialized] Issue is not seen with picolibc. The variable was introduced as part of PR #76257 Upstream PR: zephyrproject-rtos/zephyr#79186 Signed-off-by: Tommi Rantanen <[email protected]>
1 parent 42e9d3b commit 7dbf111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/lib/coap/coap_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ static void coap_client_recv(void *coap_cl, void *a, void *b)
894894
for (int i = 0; i < num_clients; i++) {
895895
if (clients[i]->response_ready) {
896896
struct coap_packet response;
897-
bool response_truncated;
897+
bool response_truncated = false;
898898

899899
k_mutex_lock(&clients[i]->lock, K_FOREVER);
900900

0 commit comments

Comments
 (0)