From 01c75bc22bfb6263538be7a13855abbcd87d4afe Mon Sep 17 00:00:00 2001 From: MLopez-Ibanez <2620021+MLopez-Ibanez@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:25:43 +0000 Subject: [PATCH] fix some warnings --- .github/workflows/R-CMD-check.yaml | 2 +- src/Reaf.c | 2 +- src/eaf/eaf.h | 4 ++-- src/eaf/svn_version | 2 +- src/mo-tools/svn_version | 2 +- src/mo-tools/whv.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index ef24d7b..3444914 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -137,7 +137,7 @@ jobs: run-only: true coverage: - needs: rchk + needs: R-CMD-check name: Coverage ${{ matrix.config.os }} (${{ matrix.config.r }}) runs-on: ${{ matrix.config.os }} strategy: diff --git a/src/Reaf.c b/src/Reaf.c index 3a950e5..233f4e5 100644 --- a/src/Reaf.c +++ b/src/Reaf.c @@ -48,7 +48,7 @@ compute_eaf_helper (SEXP DATA, int nobj, SEXP CUMSIZES, int nruns, DEBUG2( Rprintf ("eaf computed\n"); for (k = 0; k < nlevels; k++) { - Rprintf ("eaf[%d] = %zu\n", k, eaf[k]->size); + Rprintf ("eaf[%d] = %lu\n", k, (unsigned long) eaf[k]->size); }); return eaf; diff --git a/src/eaf/eaf.h b/src/eaf/eaf.h index cb30b2c..3be2e51 100644 --- a/src/eaf/eaf.h +++ b/src/eaf/eaf.h @@ -43,8 +43,8 @@ #define EAF_MALLOC(WHAT, NMEMB, TYPE) \ do { WHAT = malloc (NMEMB * sizeof(TYPE)); \ if (!WHAT) { \ - Rf_error(__FILE__ ": %s = malloc (%u * %zu) failed", \ - #WHAT, (unsigned int) NMEMB, sizeof(TYPE)); } \ + Rf_error(__FILE__ ": %s = malloc (%u * %lu) failed", \ + #WHAT, (unsigned int) NMEMB, (unsigned long) sizeof(TYPE)); } \ } while (0) #else #define EAF_MALLOC(WHAT, NMEMB, TYPE) \ diff --git a/src/eaf/svn_version b/src/eaf/svn_version index eff3954..e6d11f6 100644 --- a/src/eaf/svn_version +++ b/src/eaf/svn_version @@ -1 +1 @@ -290 \ No newline at end of file +291 \ No newline at end of file diff --git a/src/mo-tools/svn_version b/src/mo-tools/svn_version index 4a8d924..83981c0 100644 --- a/src/mo-tools/svn_version +++ b/src/mo-tools/svn_version @@ -1 +1 @@ -174 \ No newline at end of file +175 \ No newline at end of file diff --git a/src/mo-tools/whv.c b/src/mo-tools/whv.c index bee8d83..6ab32f7 100644 --- a/src/mo-tools/whv.c +++ b/src/mo-tools/whv.c @@ -59,7 +59,7 @@ rect_weighted_hv2d(double *data, size_t n, double * rectangles, print_point(pk, p, r, rect); \ } while(0) - DEBUG2_PRINT("n = %zu\trectangles = %zu\n", n, rectangles_nrow); + DEBUG2_PRINT("n = %lu\trectangles = %lu\n", (unsigned long)n, (unsigned long)rectangles_nrow); if (rectangles_nrow == 0 || n == 0) return 0; const int nobj = 2;