Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/freadR.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/nafill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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<nx; i++) {
switch (TYPEOF(VECTOR_ELT(x, i))) {
Expand Down
Loading