From 1a611c6df70b36873c0614c2d2893e676dd9ea51 Mon Sep 17 00:00:00 2001 From: Rich FitzJohn Date: Thu, 22 Feb 2024 15:57:45 +0000 Subject: [PATCH] Fix incorrect format usage --- DESCRIPTION | 2 +- inst/library.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d8f973c8..a4944e73 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: odin Title: ODE Generation and Integration -Version: 1.5.9 +Version: 1.5.10 Authors@R: c(person("Rich", "FitzJohn", role = c("aut", "cre"), email = "rich.fitzjohn@gmail.com"), person("Thibaut", "Jombart", role = "ctb"), diff --git a/inst/library.c b/inst/library.c index 8112f860..058c7d70 100644 --- a/inst/library.c +++ b/inst/library.c @@ -27,7 +27,7 @@ int user_get_scalar_int(SEXP user, const char *name, SEXP el = user_list_element(user, name); if (el != R_NilValue) { if (length(el) != 1) { - Rf_error("Expected scalar integer for '%d'", name); + Rf_error("Expected scalar integer for '%s'", name); } if (TYPEOF(el) == REALSXP) { double tmp = REAL(el)[0]; @@ -100,7 +100,7 @@ void* user_get_array(SEXP user, bool is_integer, void * previous, Rf_error("Expected length %d value for '%s'", dim_expected, name); } else { Rf_error("Incorrect size of dimension %d of '%s' (expected %d)", - i + 1, name, dim_expected); + (int)i + 1, name, dim_expected); } } } @@ -345,11 +345,11 @@ void interpolate_check_y(size_t nx, size_t ny, size_t i, const char *name_arg, c if (i == 0) { // vector case Rf_error("Expected %s to have length %d (for '%s')", - name_arg, nx, name_target); + name_arg, (int)nx, name_target); } else { // array case Rf_error("Expected dimension %d of %s to have size %d (for '%s')", - i, name_arg, nx, name_target); + (int)i, name_arg, (int)nx, name_target); } } }