[binutils-gdb] bfd/pdb: fix -Wmaybe-uninitialized warning
Mark Harmstone
maharmstone@sourceware.org
Thu Sep 5 08:58:57 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=897a57a12626b8f41490bf62bac212b0e4a7566b
commit 897a57a12626b8f41490bf62bac212b0e4a7566b
Author: Mark Harmstone <mark@harmstone.com>
Date: Wed Sep 4 18:52:28 2024 +0100
bfd/pdb: fix -Wmaybe-uninitialized warning
Initialize stream0_start to fix spurious -Wmaybe-uninitialized warning
on some versions of gcc.
Diff:
---
bfd/pdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bfd/pdb.c b/bfd/pdb.c
index c4c528711ed..340cda667a2 100644
--- a/bfd/pdb.c
+++ b/bfd/pdb.c
@@ -718,7 +718,7 @@ pdb_write_contents (bfd *abfd)
uint32_t num_blocks;
uint32_t num_files = 0;
uint32_t num_directory_bytes = sizeof (uint32_t);
- uint32_t stream0_start;
+ uint32_t stream0_start = 0;
bfd *arelt;
if (bfd_write (pdb_magic, sizeof (pdb_magic), abfd) != sizeof (pdb_magic))
More information about the Binutils-cvs
mailing list