diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-11-04 02:50:09 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-11-04 02:50:09 +0300 |
commit | 2ec23cf3b7c3f0ba4422bbd07b5589fddfcfd934 (patch) | |
tree | 8a1ec994712070644c4933effc300ff5f0c3501f /src/GCodes | |
parent | 31f4955afb95dbe35eda20c590eb3bf8d251866d (diff) |
Static analysis fixes
Diffstat (limited to 'src/GCodes')
-rw-r--r-- | src/GCodes/GCodeBuffer/ExpressionParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GCodes/GCodeBuffer/ExpressionParser.cpp b/src/GCodes/GCodeBuffer/ExpressionParser.cpp index b091227d..80bcd89c 100644 --- a/src/GCodes/GCodeBuffer/ExpressionParser.cpp +++ b/src/GCodes/GCodeBuffer/ExpressionParser.cpp @@ -1432,8 +1432,8 @@ void ExpressionParser::ThrowParseException(const char *str, uint32_t param) cons // Call this before making a recursive call, or before calling a function that needs a lot of stack from a recursive function void ExpressionParser::CheckStack(uint32_t calledFunctionStackUsage) const THROWS(GCodeException) { - register const char * stackPtr asm ("sp"); // get the current stack pointer - const char *stackLimit = (const char*)TaskBase::GetCurrentTaskStackBase(); // get the base (lowest available address) of the stack for this task + const char *_ecv_array stackPtr = (const char *_ecv_array)GetStackPointer(); + const char *_ecv_array stackLimit = (const char *_ecv_array)TaskBase::GetCurrentTaskStackBase(); // get the base (lowest available address) of the stack for this task //debugPrintf("Margin: %u\n", stackPtr - stackLimit); if (stackLimit + calledFunctionStackUsage + (StackUsage::Throw + StackUsage::Margin) <= stackPtr) |