Skip to content

Commit 92d764d

Browse files
committed
Use literal format string
1 parent 29599cc commit 92d764d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# rlang (development version)
22

3+
* Fix for CRAN checks.
4+
5+
36
# rlang 1.1.2
47

58
* Fixed an off-by-one typo in the traceback source column location (#1633).

src/internal/tests.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@ r_obj* ffi_test_r_warn(r_obj* x) {
101101
}
102102

103103
r_obj* ffi_test_Rf_warning(r_obj* msg) {
104-
Rf_warning(r_chr_get_c_string(msg, 0));
104+
Rf_warning("%s", r_chr_get_c_string(msg, 0));
105105
return r_null;
106106
}
107107
r_obj* ffi_test_Rf_error(r_obj* msg) {
108-
Rf_error(r_chr_get_c_string(msg, 0));
108+
Rf_error("%s", r_chr_get_c_string(msg, 0));
109109
return r_null;
110110
}
111111

112112
r_obj* ffi_test_Rf_warningcall(r_obj* call, r_obj* msg) {
113-
Rf_warningcall(call, r_chr_get_c_string(msg, 0));
113+
Rf_warningcall(call, "%s", r_chr_get_c_string(msg, 0));
114114
return r_null;
115115
}
116116
r_obj* ffi_test_Rf_errorcall(r_obj* call, r_obj* msg) {
117-
Rf_errorcall(call, r_chr_get_c_string(msg, 0));
117+
Rf_errorcall(call, "%s", r_chr_get_c_string(msg, 0));
118118
return r_null;
119119
}
120120

0 commit comments

Comments
 (0)