Skip to content

Commit b9c6321

Browse files
heitbaumpelwell
authored andcommitted
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; | ^~~
1 parent 8a78b53 commit b9c6321

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vclog/vclog.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ int32_t main(int32_t argc, char *argv[])
194194
uint32_t payload_pos;
195195
uint32_t payload_len;
196196

197+
msg.size = 0;
197198
payload_pos = log_copy_wrap(log_buffer, log_size,
198199
read_pos, sizeof(msg), (char *)&msg);
199200
payload_len = msg.size - sizeof(msg_hdr_t);

0 commit comments

Comments
 (0)