0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-01-19 10:42:06 +00:00
2024-05-22 12:14:32 +00:00

30 lines
1.0 KiB
Diff

From 4e4e5736b5c69de3c68c5c02ceddfbe42eb8f915 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Wed, 22 May 2024 21:29:31 +1000
Subject: [PATCH] vclog: fix compiler error with gcc-14.1
Fixes:
./vclog/vclog.c:199:30: error: 'msg.size' may be used uninitialized [-Werror=maybe-uninitialized]
199 | payload_len = msg.size - sizeof(msg_hdr_t);
| ~~~^~~~~
./vclog/vclog.c:193:23: note: 'msg' declared here
193 | msg_hdr_t msg;
| ^~~
---
vclog/vclog.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/vclog/vclog.c b/vclog/vclog.c
index 85e1366..34590fd 100644
--- a/vclog/vclog.c
+++ b/vclog/vclog.c
@@ -194,6 +194,7 @@ int32_t main(int32_t argc, char *argv[])
uint32_t payload_pos;
uint32_t payload_len;
+ msg.size = 0;
payload_pos = log_copy_wrap(log_buffer, log_size,
read_pos, sizeof(msg), (char *)&msg);
payload_len = msg.size - sizeof(msg_hdr_t);