Skip to content

Commit cbe90d3

Browse files
finally fixed "-Wformat-security" warning
1 parent 1dba093 commit cbe90d3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/rigraph/rinterface.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,9 @@ SEXP R_igraph_handle_safe_eval_result(SEXP result) {
197197
SEXP condition_message = PROTECT(Rf_install("conditionMessage"));
198198
SEXP condition_message_call = PROTECT(Rf_lang2(condition_message, result));
199199
SEXP evaluated_condition_message = PROTECT(Rf_eval(condition_message_call, R_GlobalEnv));
200+
// error(CHAR(STRING_ELT(evaluated_condition_message, 0)));
200201
// fix for 'format string is not a string literal' flag warning
201-
const char *message_char;
202-
message_char = CHAR(STRING_ELT(evaluated_condition_message, 0));
203-
if (message_char != NULL) {
204-
error(message_char);
205-
} else {
206-
error("Something screwed up in R_igraph_handle_safe_eval_result()");
207-
}
202+
REprintf("%s\n", CHAR(STRING_ELT(evaluated_condition_message, 0)));
208203
UNPROTECT(3);
209204
return R_NilValue;
210205

0 commit comments

Comments
 (0)