From c8b0c0e97b77b9dc74c8dd8251bcc9affac9e8c2 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 9 May 2023 15:02:25 +0100 Subject: [PATCH] Code coverage --- src/action_class_set_darray.cc | 3 --- src/action_class_set_iarray.cc | 13 +++++-------- src/grib_dumper_class_keys.cc | 18 ++++++------------ 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/src/action_class_set_darray.cc b/src/action_class_set_darray.cc index 4b87a719c..43d249594 100644 --- a/src/action_class_set_darray.cc +++ b/src/action_class_set_darray.cc @@ -8,9 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*************************************************************************** - * Enrico Fucile * - ***************************************************************************/ #include "grib_api_internal.h" /* This is used by make_class.pl diff --git a/src/action_class_set_iarray.cc b/src/action_class_set_iarray.cc index 0c90c74d6..84becfd8c 100644 --- a/src/action_class_set_iarray.cc +++ b/src/action_class_set_iarray.cc @@ -8,9 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*************************************************************************** - * Enrico Fucile * - ***************************************************************************/ #include "grib_api_internal.h" /* This is used by make_class.pl @@ -58,12 +55,9 @@ static grib_action_class _grib_action_class_set_iarray = { &init_class, /* init_class */ 0, /* init */ &destroy, /* destroy */ - &dump, /* dump */ &xref, /* xref */ - 0, /* create_accessor*/ - 0, /* notify_change */ 0, /* reparse */ &execute, /* execute */ @@ -80,6 +74,9 @@ grib_action* grib_action_create_set_iarray(grib_context* context, const char* name, grib_iarray* iarray) { + Assert(!"grib_action_create_set_iarray: Not implemented"); + return NULL; +#if 0 char buf[1024]; grib_action_set_iarray* a; grib_action_class* c = grib_action_class_set_iarray; @@ -98,18 +95,18 @@ grib_action* grib_action_create_set_iarray(grib_context* context, act->name = grib_context_strdup_persistent(context, buf); return act; +#endif } static int execute(grib_action* a, grib_handle* h) { grib_action_set_iarray* self = (grib_action_set_iarray*)a; - return grib_set_long_array(h, self->name, self->iarray->v, self->iarray->n); } static void dump(grib_action* act, FILE* f, int lvl) { - int i = 0; + int i = 0; grib_action_set_iarray* self = (grib_action_set_iarray*)act; for (i = 0; i < lvl; i++) grib_context_print(act->context, f, " "); diff --git a/src/grib_dumper_class_keys.cc b/src/grib_dumper_class_keys.cc index ed979677b..fd74f715c 100644 --- a/src/grib_dumper_class_keys.cc +++ b/src/grib_dumper_class_keys.cc @@ -8,11 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/************************************** - * Enrico Fucile - **************************************/ - - #include "grib_api_internal.h" #include /* @@ -89,8 +84,6 @@ grib_dumper_class* grib_dumper_class_keys = &_grib_dumper_class_keys; /* END_CLASS_IMP */ -static void print_offset(FILE* out, grib_dumper* d, grib_accessor* a); - static void init_class(grib_dumper_class* c) {} static int init(grib_dumper* d) @@ -106,6 +99,7 @@ static int destroy(grib_dumper* d) return GRIB_SUCCESS; } +#if 0 static void aliases(grib_dumper* d, grib_accessor* a) { int i; @@ -130,14 +124,15 @@ static void aliases(grib_dumper* d, grib_accessor* a) printf(") "); } } +#endif static void dump_name_only(grib_dumper* d, grib_accessor* a, const char* comment) { +#if 0 grib_dumper_keys* self = (grib_dumper_keys*)d; print_offset(self->dumper.out, d, a); - if (a->flags & GRIB_ACCESSOR_FLAG_HIDDEN) { return; } @@ -162,6 +157,7 @@ static void dump_name_only(grib_dumper* d, grib_accessor* a, const char* comment aliases(d, a); fprintf(self->dumper.out, "\n"); +#endif } static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment) @@ -274,6 +270,7 @@ static void dump_label(grib_dumper* d, grib_accessor* a, const char* comment) static void dump_section(grib_dumper* d, grib_accessor* a, grib_block_of_accessors* block) { +#if 0 grib_dumper_keys* self = (grib_dumper_keys*)d; /*grib_section* s = grib_get_sub_section(a);*/ int is_default_section = 0; @@ -314,8 +311,5 @@ static void dump_section(grib_dumper* d, grib_accessor* a, grib_block_of_accesso /*for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," ");*/ /*fprintf(self->dumper.out,"<===== %s %s\n",a->creator->op, a->name);*/ -} - -static void print_offset(FILE* out, grib_dumper* d, grib_accessor* a) -{ +#endif }