Browse Source

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

ellensp 4 years ago
parent
commit
af23c0480e
No account linked to committer's email address
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      Marlin/src/gcode/parser.cpp

+ 3
- 1
Marlin/src/gcode/parser.cpp View File

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

Loading…
Cancel
Save