Don't define 'valptr' if unused (#17048)
This commit is contained in:
parent
624ab24a5c
commit
af23c0480e
1 changed files with 3 additions and 1 deletions
|
@ -312,8 +312,10 @@ void GCodeParser::parse(char *p) {
|
||||||
char * const valptr = has_val ? is_str ? unescape_string(p) : p : nullptr;
|
char * const valptr = has_val ? is_str ? unescape_string(p) : p : nullptr;
|
||||||
#else
|
#else
|
||||||
const bool has_val = valid_float(p);
|
const bool has_val = valid_float(p);
|
||||||
|
#if ENABLED(FASTER_GCODE_PARSER)
|
||||||
char * const valptr = has_val ? p : nullptr;
|
char * const valptr = has_val ? p : nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(DEBUG_GCODE_PARSER)
|
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||||
if (debug) {
|
if (debug) {
|
||||||
|
|
Reference in a new issue