Compiler warnings

This commit is contained in:
shahramn 2024-08-30 15:27:35 +01:00
parent 67cb699e08
commit 1f8206a111
45 changed files with 342 additions and 421 deletions

View File

@ -24,12 +24,9 @@ static grib_action_class _grib_action_class_NAME = {
&init_class, /* init_class */
&init, /* init */
&destroy, /* destroy */
&dump, /* dump */
&xref, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
&notify_change, /* notify_change */
&reparse, /* reparse */
&execute, /* execute */

View File

@ -56,12 +56,9 @@ static grib_action_class _grib_action_class_alias = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
0, /* notify_change */
0, /* reparse */
0, /* execute */

View File

@ -56,12 +56,9 @@ static grib_action_class _grib_action_class_assert = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
&notify_change, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -50,12 +50,9 @@ static grib_action_class _grib_action_class_close = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
0, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -67,12 +67,9 @@ static grib_action_class _grib_action_class_concept = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
0, /* execute */

View File

@ -61,12 +61,9 @@ static grib_action_class _grib_action_class_gen = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
&notify_change, /* notify_change */
0, /* reparse */
0, /* execute */

View File

@ -68,12 +68,9 @@ static grib_action_class _grib_action_class_hash_array = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
0, /* execute */

View File

@ -68,12 +68,9 @@ static grib_action_class _grib_action_class_if = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
0, /* notify_change */
&reparse, /* reparse */
&execute, /* execute */

View File

@ -63,12 +63,9 @@ static grib_action_class _grib_action_class_list = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
0, /* notify_change */
&reparse, /* reparse */
0, /* execute */

View File

@ -58,12 +58,9 @@ static grib_action_class _grib_action_class_meta = {
&init_class, /* init_class */
0, /* init */
0, /* destroy */
&dump, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -56,12 +56,9 @@ static grib_action_class _grib_action_class_modify = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
0, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
0, /* notify_change */
0, /* reparse */
0, /* execute */

View File

@ -51,12 +51,9 @@ static grib_action_class _grib_action_class_noop = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
0, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -55,12 +55,9 @@ static grib_action_class _grib_action_class_print = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
0, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -56,12 +56,9 @@ static grib_action_class _grib_action_class_remove = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
0, /* notify_change */
0, /* reparse */
0, /* execute */

View File

@ -58,12 +58,9 @@ static grib_action_class _grib_action_class_rename = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
0, /* notify_change */
0, /* reparse */
0, /* execute */

View File

@ -51,12 +51,9 @@ static grib_action_class _grib_action_class_section = {
&init_class, /* init_class */
0, /* init */
0, /* destroy */
0, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
&notify_change, /* notify_change */
0, /* reparse */
0, /* execute */

View File

@ -56,12 +56,9 @@ static grib_action_class _grib_action_class_set = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -54,12 +54,9 @@ static grib_action_class _grib_action_class_set_darray = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -52,12 +52,9 @@ static grib_action_class _grib_action_class_set_missing = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -54,12 +54,9 @@ static grib_action_class _grib_action_class_set_sarray = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -58,12 +58,9 @@ static grib_action_class _grib_action_class_switch = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
0, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -64,12 +64,9 @@ static grib_action_class _grib_action_class_template = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
0, /* notify_change */
&reparse, /* reparse */
0, /* execute */

View File

@ -59,12 +59,9 @@ static grib_action_class _grib_action_class_transient_darray = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -55,12 +55,9 @@ static grib_action_class _grib_action_class_variable = {
&init_class, /* init_class */
0, /* init */
0, /* destroy */
0, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -60,12 +60,9 @@ static grib_action_class _grib_action_class_when = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
&dump, /* dump */
0, /* xref */
&create_accessor, /* create_accessor*/
&create_accessor, /* create_accessor */
&notify_change, /* notify_change */
0, /* reparse */
0, /* execute */

View File

@ -54,12 +54,9 @@ static grib_action_class _grib_action_class_write = {
&init_class, /* init_class */
0, /* init */
&destroy, /* destroy */
0, /* dump */
0, /* xref */
0, /* create_accessor*/
0, /* create_accessor */
0, /* notify_change */
0, /* reparse */
&execute, /* execute */

View File

@ -2,7 +2,7 @@ typedef const char* string; /* to keep make_class.pl happy */
static void init(grib_expression* e);
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);

View File

@ -74,7 +74,7 @@ static struct table_entry table[] = {
grib_section* grib_create_root_section(const grib_context* context, grib_handle* h)
{
char* fpath = 0;
const char* fpath = 0;
grib_section* s = (grib_section*)grib_context_malloc_clear(context, sizeof(grib_section));
GRIB_MUTEX_INIT_ONCE(&once, &init_mutex);

View File

@ -661,8 +661,7 @@ static int init_definition_files_dir(grib_context* c)
}
else {
/* Definitions path contains multiple directories */
char* dir = NULL;
dir = strtok_r(path, ECC_PATH_DELIMITER_STR, &lasts);
const char* dir = strtok_r(path, ECC_PATH_DELIMITER_STR, &lasts);
while (dir != NULL) {
if (next) {
@ -1233,7 +1232,7 @@ void codes_assertion_failed(const char* message, const char* file, int line)
/* Default behaviour is to abort
* unless user has supplied his own assertion routine */
if (assertion == NULL) {
grib_context* c = grib_context_get_default();
const grib_context* c = grib_context_get_default();
fprintf(stderr, "ecCodes assertion failed: `%s' in %s:%d\n", message, file, line);
if (!c->no_abort) {
abort();

View File

@ -42,7 +42,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*, FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);

View File

@ -42,7 +42,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*, FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);

View File

@ -38,7 +38,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*, FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);

View File

@ -38,7 +38,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);

View File

@ -39,7 +39,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);

View File

@ -41,7 +41,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);

View File

@ -42,7 +42,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*, FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);

View File

@ -42,7 +42,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);

View File

@ -39,7 +39,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*, FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);

View File

@ -39,7 +39,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);

View File

@ -38,7 +38,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);

View File

@ -37,7 +37,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);

View File

@ -40,7 +40,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);

View File

@ -37,7 +37,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static string evaluate_string(grib_expression*,grib_handle*,char*,size_t*,int*);

View File

@ -37,7 +37,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static int native_type(grib_expression*,grib_handle*);
static int evaluate_long(grib_expression*,grib_handle*,long*);

View File

@ -41,7 +41,7 @@ or edit "expression.class" and rerun ./make_class.pl
typedef const char* string; /* to keep make_class.pl happy */
static void destroy(grib_context*,grib_expression* e);
static void print(grib_context*,grib_expression*,grib_handle*,FILE*);
static void print(grib_context*, grib_expression*, grib_handle*, FILE*);
static void add_dependency(grib_expression* e, grib_accessor* observer);
static string get_name(grib_expression* e);
static int native_type(grib_expression*,grib_handle*);