From 3d5157514889c668bc14c245246c388eb23615ea Mon Sep 17 00:00:00 2001 From: pekkarr Date: Mon, 29 Apr 2024 10:00:38 +0300 Subject: [PATCH] Fix gcc's -Wformat-security warning in R Raise function (#2896) The `Rf_error` function takes a format string as its first argument. --- Lib/r/r.swg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } %} -- 2.44.0