aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpekkarr <pekkarr@protonmail.com>2024-04-29 10:00:38 +0300
committerGitHub <noreply@github.com>2024-04-29 08:00:38 +0100
commit3d5157514889c668bc14c245246c388eb23615ea (patch)
tree70317f42cf7577b548d5b468a76d6bb59e56cc87
parent393de5b0d6c605910458ffd1492a5ba5a4291959 (diff)
downloadswig-3d5157514889c668bc14c245246c388eb23615ea.tar.gz
Fix gcc's -Wformat-security warning in R Raise function (#2896)
The `Rf_error` function takes a format string as its first argument.
-rw-r--r--Lib/r/r.swg2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/r/r.swg b/Lib/r/r.swg
index c1ce37c3e..63b69d8cf 100644
--- a/Lib/r/r.swg
+++ b/Lib/r/r.swg
@@ -28,7 +28,7 @@ SWIGEXPORT void SWIG_init(void) {
%runtime %{
SWIGINTERN void SWIG_R_Raise(SEXP obj, const char *msg) {
- Rf_error(Rf_isString(obj) ? CHAR(Rf_asChar(obj)) : msg);
+ Rf_error("%s", Rf_isString(obj) ? CHAR(Rf_asChar(obj)) : msg);
}
%}