From c9b15736dac81a2b296ac3501214c726c2b214af Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 24 Mar 2023 09:56:40 +0100 Subject: [PATCH] Fixed compilation errors and warnings --- src/libslic3r/GCode.cpp | 4 ++-- src/libslic3r/I18N.hpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 041194435..d4278ed74 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1671,12 +1671,12 @@ void GCode::print_machine_envelope(GCodeOutputStream &file, Print &print) int(print.config().machine_max_acceleration_travel.values.front() + 0.5)); else if (flavor == gcfMarlinLegacy) // Legacy Marlin uses M204 S[print] T[retract] - file.write_format("M204 " + "S%d T%d ; sets acceleration (S) and retract acceleration (R), mm/sec^2\n", + file.write_format("M204 S%d T%d ; sets acceleration (S) and retract acceleration (R), mm/sec^2\n", int(print.config().machine_max_acceleration_extruding.values.front() + 0.5), int(print.config().machine_max_acceleration_retracting.values.front() + 0.5)); else if (flavor == gcfMarlinFirmware) // New Marlin uses M204 P[print] R[retract] T[travel] - file.write_format("M204 " + "P%d R%d T%d ; sets acceleration (P, T) and retract acceleration (R), mm/sec^2\n", + file.write_format("M204 P%d R%d T%d ; sets acceleration (P, T) and retract acceleration (R), mm/sec^2\n", int(print.config().machine_max_acceleration_extruding.values.front() + 0.5), int(print.config().machine_max_acceleration_retracting.values.front() + 0.5), int(print.config().machine_max_acceleration_travel.values.front() + 0.5)); diff --git a/src/libslic3r/I18N.hpp b/src/libslic3r/I18N.hpp index 3cc196b6a..5d2068a3d 100644 --- a/src/libslic3r/I18N.hpp +++ b/src/libslic3r/I18N.hpp @@ -28,9 +28,9 @@ namespace I18N { #error L macro is defined where it shouldn't be. Didn't you include slic3r/GUI/I18N.hpp in libslic3r by mistake? #endif namespace { - const char* L(const char* s) { return s; } - const char* L_CONTEXT(const char* s, const char* context) { return s; } - std::string _u8L(const char* s) { return Slic3r::I18N::translate(s); } + [[maybe_unused]] const char* L(const char* s) { return s; } + [[maybe_unused]] const char* L_CONTEXT(const char* s, const char* context) { return s; } + [[maybe_unused]] std::string _u8L(const char* s) { return Slic3r::I18N::translate(s); } } #endif