Don't define 'valptr' if unused (#17048)

This commit is contained in:
ellensp 2020-03-03 08:17:52 +13:00 committed by GitHub
parent 624ab24a5c
commit af23c0480e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -312,7 +312,9 @@ void GCodeParser::parse(char *p) {
char * const valptr = has_val ? is_str ? unescape_string(p) : p : nullptr;
#else
const bool has_val = valid_float(p);
char * const valptr = has_val ? p : nullptr;
#if ENABLED(FASTER_GCODE_PARSER)
char * const valptr = has_val ? p : nullptr;
#endif
#endif
#if ENABLED(DEBUG_GCODE_PARSER)