From 416fec9562293e7cbb4617a1dde7171e2f3bd002 Mon Sep 17 00:00:00 2001 From: Wes Hinsley Date: Fri, 21 Jun 2024 09:30:57 +0100 Subject: [PATCH] Use %zu instead --- inst/support.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/support.hpp b/inst/support.hpp index 11a36f1..fea73e8 100644 --- a/inst/support.hpp +++ b/inst/support.hpp @@ -75,8 +75,8 @@ void user_check_array_dim(cpp11::sexp x, const char *name, cpp11::integers dim = cpp11::as_cpp(x.attr("dim")); for (size_t i = 0; i < N; ++i) { if (dim[(int)i] != dim_expected[i]) { - Rf_error("Incorrect size of dimension %d of '%s' (expected %d)", - static_cast(i + 1), name, dim_expected[i]); + Rf_error("Incorrect size of dimension %zu of '%s' (expected %d)", + i + 1, name, dim_expected[i]); } } }