[Pdbg] [PATCH] libpdbg: Initialize to avoid build errors with -O3
Amitay Isaacs
amitay at ozlabs.org
Wed Aug 8 19:17:40 AEST 2018
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/chip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libpdbg/chip.c b/libpdbg/chip.c
index 079592c..3cf33ec 100644
--- a/libpdbg/chip.c
+++ b/libpdbg/chip.c
@@ -325,7 +325,7 @@ int ram_state_thread(struct pdbg_target *thread, struct thread_regs *regs)
{
struct thread_regs _regs;
struct thread *t;
- uint64_t value;
+ uint64_t value = 0;
int i;
if (!regs)
@@ -362,7 +362,7 @@ int ram_state_thread(struct pdbg_target *thread, struct thread_regs *regs)
regs->cr = 0;
for (i = 0; i < 8; i++) {
- uint64_t cr;
+ uint64_t cr = 0;
ram_getcr(thread, i, &cr);
regs->cr |= cr;
}
--
2.17.1
More information about the Pdbg
mailing list