diff --git a/src/freadR.c b/src/freadR.c index 777a8bbf13..9338dbf61a 100644 --- a/src/freadR.c +++ b/src/freadR.c @@ -832,8 +832,8 @@ SEXP spillConnectionToFile(SEXP connection, SEXP tempfile_path, SEXP nrows_limit const double nrows_max = REAL_RO(nrows_limit)[0]; if (R_FINITE(nrows_max) && nrows_max >= 0.0) { - if (nrows_max > SIZE_MAX) - STOP(_("spillConnectionToFile: nrows_limit (%g) must fit into a native-size unsigned integer (<= %zu)"), nrows_max, (size_t)SIZE_MAX); // # nocov + if (nrows_max >= (double)SIZE_MAX) + STOP(_("spillConnectionToFile: nrows_limit (%g) must fit into a native-size unsigned integer (< %zu)"), nrows_max, (size_t)SIZE_MAX); // # nocov state.row_limit = (size_t)nrows_max; if (state.row_limit == 0) state.row_limit = 100; // read at least 100 rows if nrows==0 state.row_limit++; // cater for potential header row diff --git a/src/nafill.c b/src/nafill.c index 43146f9dc8..8a8e8eab56 100644 --- a/src/nafill.c +++ b/src/nafill.c @@ -247,6 +247,7 @@ SEXP nafillR(SEXP obj, SEXP type, SEXP fill, SEXP nan_is_na_arg, SEXP inplace, S } } // need any_char guard to avoid parallelizing on character columns + (void)any_char; // used only by OpenMP-enabled builds; avoid -Wunused-but-set-variable otherwise #pragma omp parallel for if (nx>1 && !any_char) num_threads(getDTthreads(nx, true)) for (R_len_t i=0; i