From 2be3dddd15bd9ddf09eb6590c5a898b6e3f9e9f0 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 30 Jun 2022 10:29:14 +0100 Subject: [PATCH] ECC-1419: C API: codes_fieldset_new_from_files: The 'filenames' argument should be const --- tools/grib_tools.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/grib_tools.c b/tools/grib_tools.c index c8b45ce47..2680a2488 100644 --- a/tools/grib_tools.c +++ b/tools/grib_tools.c @@ -215,7 +215,7 @@ static int grib_tool_with_orderby(grib_runtime_options* options) grib_failed *failed = NULL, *p = NULL; grib_handle* h = NULL; grib_tools_file* infile = options->infile; - char** filenames; + const char** filenames = NULL; int files_count = 0; grib_fieldset* set = NULL; int i = 0; @@ -230,7 +230,7 @@ static int grib_tool_with_orderby(grib_runtime_options* options) infile = infile->next; } - filenames = (char**)grib_context_malloc_clear(c, files_count * sizeof(char*)); + filenames = (const char**)grib_context_malloc_clear(c, files_count * sizeof(char*)); infile = options->infile; for (i = 0; i < files_count; i++) {