From 58d78e8dbdafae1e4b459fe4e439021796a87fcf Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Mon, 20 May 2019 11:00:38 -0500 Subject: [PATCH 1/2] Fix two errors with -Werror=format-security Fedora (and, I supposed, most recent Linux distros) build everything with -Werror=format-security. If you attempt to build with -DSLIC3R_PERL_XS (which we need in order to run the test suite), the build fails because of two strings in the Perl XS code: /usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t "/builddir/build/BUILD/PrusaSlicer-version_2.0.0-rc2/xs/xsp/typemap.xspt" "/builddir/build/BUILD/PrusaSlicer-version_2.0.0-rc2/xs/xsp/Print.xsp":585:31: error: format not a string literal and no format arguments [-Werror=format-security] Ths fixes up two instances of that. --- xs/xsp/Print.xsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp index b8662dcd8..f4c04577d 100644 --- a/xs/xsp/Print.xsp +++ b/xs/xsp/Print.xsp @@ -165,7 +165,7 @@ _constant() try { THIS->process(); } catch (std::exception& e) { - croak(e.what()); + croak("%s\n", e.what()); } %}; @@ -173,7 +173,7 @@ _constant() try { THIS->export_gcode(path_template, nullptr); } catch (std::exception& e) { - croak(e.what()); + croak("%s\n", e.what()); } %}; From 28d28a54bffb39d857c2626088433487c6dd3046 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Mon, 20 May 2019 18:36:11 +0200 Subject: [PATCH 2/2] Preset updating: Judge dev version based on version online, not current --- src/slic3r/GUI/UpdateDialogs.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/UpdateDialogs.cpp b/src/slic3r/GUI/UpdateDialogs.cpp index a4f696fb8..0f72b3b35 100644 --- a/src/slic3r/GUI/UpdateDialogs.cpp +++ b/src/slic3r/GUI/UpdateDialogs.cpp @@ -39,8 +39,7 @@ MsgUpdateSlic3r::MsgUpdateSlic3r(const Semver &ver_current, const Semver &ver_on ver_current(ver_current), ver_online(ver_online) { - const auto version = Semver::parse(SLIC3R_VERSION); - const bool dev_version = version->prerelease() != nullptr || boost::algorithm::ends_with(SLIC3R_BUILD_ID, "UNKNOWN"); + const bool dev_version = ver_online.prerelease() != nullptr; auto *versions = new wxFlexGridSizer(2, 0, VERT_SPACING); versions->Add(new wxStaticText(this, wxID_ANY, _(L("Current version:")))); @@ -119,7 +118,7 @@ MsgUpdateConfig::MsgUpdateConfig(const std::vector &updates) : versions->Add(flex); - if (! update.changelog_url.empty()) { + if (! update.changelog_url.empty() && update.version.prerelease() == nullptr) { auto *line = new wxBoxSizer(wxHORIZONTAL); auto changelog_url = (boost::format(update.changelog_url) % lang_code).str(); line->AddSpacer(3*VERT_SPACING);