[education/rkward/kf5] rkward/rbackend: Fix 'not a string literal' compile error
Thomas Friedrichsmeier
null at kde.org
Sat May 4 08:31:29 BST 2024
Git commit b53d754f18bef786e92f266f576afdbe5fd7d00b by Thomas Friedrichsmeier.
Committed on 04/05/2024 at 07:31.
Pushed by tfry into branch 'kf5'.
Fix 'not a string literal' compile error
M +4 -4 rkward/rbackend/rkrbackend.cpp
https://invent.kde.org/education/rkward/-/commit/b53d754f18bef786e92f266f576afdbe5fd7d00b
diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index 01dfa9ab9..3166aa6ec 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -944,8 +944,8 @@ SEXP doSubstackCall (SEXP _call, SEXP _args) {
// For now, for simplicity, assume args are always strings, although possibly nested in lists
auto ret = RKRBackend::this_pointer->handleRequestWithSubcommands(call, RKRSupport::SEXPToNestedStrings(_args));
- if (!ret.warning.isEmpty()) Rf_warning(RKRBackend::fromUtf8(ret.warning)); // print warnings, first, as errors will cause a stop
- if (!ret.error.isEmpty()) Rf_error(RKRBackend::fromUtf8(ret.error));
+ if (!ret.warning.isEmpty()) Rf_warning("%s", RKRBackend::fromUtf8(ret.warning)); // print warnings, first, as errors will cause a stop
+ if (!ret.error.isEmpty()) Rf_error("%s", RKRBackend::fromUtf8(ret.error));
return RKRSupport::QVariantToSEXP(ret.ret);
}
@@ -956,8 +956,8 @@ SEXP doPlainGenericRequest (SEXP call, SEXP synchronous) {
R_CheckUserInterrupt ();
auto ret = RKRBackend::this_pointer->handlePlainGenericRequest(RKRSupport::SEXPToStringList(call), RKRSupport::SEXPToInt(synchronous));
- if (!ret.warning.isEmpty()) Rf_warning(RKRBackend::fromUtf8(ret.warning)); // print warnings, first, as errors will cause a stop
- if (!ret.error.isEmpty()) Rf_error(RKRBackend::fromUtf8(ret.error));
+ if (!ret.warning.isEmpty()) Rf_warning("%s", RKRBackend::fromUtf8(ret.warning)); // print warnings, first, as errors will cause a stop
+ if (!ret.error.isEmpty()) Rf_error("%s", RKRBackend::fromUtf8(ret.error));
return RKRSupport::QVariantToSEXP(ret.ret);
}
More information about the rkward-tracker
mailing list