From f2e3c9896e6f1b871e3889bee40c8f0ea69acad7 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 11 May 2018 23:38:29 -0500 Subject: [PATCH] Fix compile warnings in backtrace Part of #10688 Co-Authored-By: ejtagle --- Marlin/src/backtrace/backtrace.cpp | 2 +- Marlin/src/backtrace/unwarmbytab.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Marlin/src/backtrace/backtrace.cpp b/Marlin/src/backtrace/backtrace.cpp index 737626744c..07cb0692f9 100644 --- a/Marlin/src/backtrace/backtrace.cpp +++ b/Marlin/src/backtrace/backtrace.cpp @@ -66,7 +66,7 @@ static const UnwindCallbacks UnwCallbacks = { void backtrace(void) { UnwindFrame btf; - uint32_t sp,lr,pc; + uint32_t sp = 0, lr = 0, pc = 0; // Capture the values of the registers to perform the traceback __asm__ __volatile__ ( diff --git a/Marlin/src/backtrace/unwarmbytab.cpp b/Marlin/src/backtrace/unwarmbytab.cpp index 607b426723..ec8a9a066c 100644 --- a/Marlin/src/backtrace/unwarmbytab.cpp +++ b/Marlin/src/backtrace/unwarmbytab.cpp @@ -129,7 +129,6 @@ static UnwResult UnwTabStateInit(const UnwindCallbacks *cb, UnwTabState *ucb, ui */ static UnwResult UnwTabExecuteInstructions(const UnwindCallbacks *cb, UnwTabState *ucb) { - UnwResult err; int instruction; uint32_t mask; uint32_t reg;