Skip to content

Commit

Permalink
follow up of #5780 to resolve -Wformat warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki authored Dec 2, 2023
1 parent a413d3c commit 8d7e40d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gsumm.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ SEXP gmean(SEXP x, SEXP narmArg)
} else {
// narm==true and anyNA==true
int *restrict nna_counts = calloc(ngrp, sizeof(int));
if (!nna_counts) error(_("Unable to allocate %d * %d bytes for non-NA counts in gmean na.rm=TRUE"), ngrp, sizeof(int));
if (!nna_counts) error(_("Unable to allocate %d * %lu bytes for non-NA counts in gmean na.rm=TRUE"), ngrp, sizeof(int));
#pragma omp parallel for num_threads(getDTthreads(highSize, false))
for (int h=0; h<highSize; h++) {
double *restrict _ans = ansp + (h<<bitshift);
Expand Down Expand Up @@ -673,7 +673,7 @@ SEXP gmean(SEXP x, SEXP narmArg)
// # nocov start
free(nna_counts_r); // free(NULL) is allowed and does nothing. Avoids repeating the error() call here.
free(nna_counts_i);
error(_("Unable to allocate %d * %d bytes for non-NA counts in gmean na.rm=TRUE"), ngrp, sizeof(int));
error(_("Unable to allocate %d * %lu bytes for non-NA counts in gmean na.rm=TRUE"), ngrp, sizeof(int));
// # nocov end
}
#pragma omp parallel for num_threads(getDTthreads(highSize, false))
Expand Down

0 comments on commit 8d7e40d

Please sign in to comment.