From 091abd5dd8f89bfb56eb0a386aed1c43f46a0331 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 13 Oct 2020 14:05:50 +0100 Subject: [PATCH] Fix logging format strings --- src/grib_handle.c | 4 ++-- tools/grib_to_netcdf.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/grib_handle.c b/src/grib_handle.c index 3a740eca2..38fb1375a 100644 --- a/src/grib_handle.c +++ b/src/grib_handle.c @@ -170,7 +170,7 @@ int grib_handle_delete(grib_handle* h) grib_section_delete(ct, h->root); grib_context_free(ct, h->gts_header); - grib_context_log(ct, GRIB_LOG_DEBUG, "grib_handle_delete: deleting handle %p", h); + grib_context_log(ct, GRIB_LOG_DEBUG, "grib_handle_delete: deleting handle %p", (void*)h); grib_context_free(ct, h); h = NULL; } @@ -192,7 +192,7 @@ grib_handle* grib_new_handle(grib_context* c) g->product_kind = PRODUCT_ANY; /* Default. Will later be set to a specific product */ } - grib_context_log(c, GRIB_LOG_DEBUG, "grib_new_handle: allocated handle %p", g); + grib_context_log(c, GRIB_LOG_DEBUG, "grib_new_handle: allocated handle %p", (void*)g); return g; } diff --git a/tools/grib_to_netcdf.c b/tools/grib_to_netcdf.c index db328327a..50b07241c 100644 --- a/tools/grib_to_netcdf.c +++ b/tools/grib_to_netcdf.c @@ -1040,7 +1040,7 @@ static err to_expand_mem(field* g) } if (count != g->value_count) - grib_context_log(ctx, GRIB_LOG_FATAL, "ecCodes: value count mismatch %d %d", count, g->value_count); + grib_context_log(ctx, GRIB_LOG_FATAL, "ecCodes: value count mismatch %ld %ld", count, g->value_count); if ((e = grib_get_long(g->handle, "missingValuesPresent", &bitmap))) { grib_context_log(ctx, GRIB_LOG_ERROR, "ecCodes: cannot get missingValuesPresent: %s", grib_get_error_message(e)); @@ -2847,7 +2847,7 @@ static int put_data(hypercube* h, int ncid, const char* name, dataset_t* subset) if (nj != count[naxis] || ni != count[naxis + 1]) { grib_context_log(ctx, GRIB_LOG_ERROR, "Grib %d has different resolution\n", i + 1); - grib_context_log(ctx, GRIB_LOG_ERROR, "lat=%d, long=%d instead of lat=%d, long=%d\n", nj, ni, count[naxis], count[naxis + 1]); + grib_context_log(ctx, GRIB_LOG_ERROR, "lat=%ld, long=%ld instead of lat=%ld, long=%ld\n", nj, ni, count[naxis], count[naxis + 1]); exit(1); }