From 630d55aaafea04f7b57c90beb7cdbf044568979d Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Thu, 4 Jan 2024 14:02:10 -0800 Subject: [PATCH] libdrgn: silence -Wmaybe-uninitialized false positive in drgn_object_from_dwarf_location() Signed-off-by: Omar Sandoval --- libdrgn/dwarf_info.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libdrgn/dwarf_info.c b/libdrgn/dwarf_info.c index 549988a9f..b72e58640 100644 --- a/libdrgn/dwarf_info.c +++ b/libdrgn/dwarf_info.c @@ -4238,7 +4238,9 @@ drgn_object_from_dwarf_location(struct drgn_program *prog, goto out; const void *src = NULL; - size_t src_size; + // Silence -Wmaybe-uninitialized false positive last seen with + // GCC 13. + size_t src_size = 0; if (binary_buffer_has_next(&ctx.bb)) { uint8_t opcode;