diff options
| author | Josh Stone <[email protected]> | 2015-02-11 14:25:37 -0800 |
|---|---|---|
| committer | Josh Stone <[email protected]> | 2015-02-11 15:50:44 -0800 |
| commit | 3d11410c481ead29ac52974d05073057d5ca5264 (patch) | |
| tree | 2195a6e7e8d52aeebfcc508898b33e2e6c2ccfdc /tests/backtrace.c | |
| parent | 031db7ce5f149c8469ac33f688a09ffb15c5d85d (diff) | |
tests: ensure backtrace.c exec_dump sets jmp
With CFLAGS='-Og -g', F21 gcc hits -Werror=maybe-uninitialized on jmp in
the call "prepare_thread (pid2, jmp)". It's fine with -O2/-O0.
The only way this could be unset is if the loop before ran to
completion, and there's already an assert against this case.
This patch initializes jmp anyway to convince gcc it's ok.
Signed-off-by: Josh Stone <[email protected]>
Diffstat (limited to 'tests/backtrace.c')
| -rw-r--r-- | tests/backtrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/backtrace.c b/tests/backtrace.c index 331ba0f2..e109654f 100644 --- a/tests/backtrace.c +++ b/tests/backtrace.c @@ -377,7 +377,7 @@ exec_dump (const char *exec) #else /* __x86_64__ */ is_x86_64_native = ehdr->e_ident[EI_CLASS] == ELFCLASS64; #endif /* __x86_64__ */ - void (*jmp) (void); + void (*jmp) (void) = 0; if (is_x86_64_native) { // Find inferior symbol named "jmp". |
