Skip to content

Commit

Permalink
maybe fix uninitialized warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Dec 30, 2023
1 parent ca05956 commit 141110c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/r-kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ SEXP geoarrow_c_kernel_push(SEXP kernel_xptr, SEXP args_sexp, SEXP array_out_xpt

// All kernels currently have just one argument
struct ArrowArray* args[1];
memset(args, 0, sizeof(args));

int n_args = Rf_length(args_sexp);
if (n_args != 1) {
Rf_error("Kernels must be passed one argument");
}

for (int i = 0; i < n_args; i++) {
args[i] = (struct ArrowArray*)R_ExternalPtrAddr(VECTOR_ELT(args_sexp, i));
}
Expand Down

0 comments on commit 141110c

Please sign in to comment.