Skip to content

Commit

Permalink
Fix incorrect format usage
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Feb 22, 2024
1 parent 1344908 commit 1a611c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"),
person("Thibaut", "Jombart", role = "ctb"),
Expand Down
8 changes: 4 additions & 4 deletions inst/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 1a611c6

Please sign in to comment.