diff --git a/src/encode_double_array.c b/src/encode_double_array.c index 5c74a587a..41ca017ab 100644 --- a/src/encode_double_array.c +++ b/src/encode_double_array.c @@ -199,7 +199,6 @@ void encode_double_array_unrolled(int numBits, long packStart, long datasize, { U_BYTEORDER; long i, j, z = *gz; - double tmp; #ifdef _ARCH_PWR6 #define __UNROLL_DEPTH_2 8 #else diff --git a/src/grib_accessor_class_raw.c b/src/grib_accessor_class_raw.c index 1fb6229ff..1c7e74407 100644 --- a/src/grib_accessor_class_raw.c +++ b/src/grib_accessor_class_raw.c @@ -140,16 +140,17 @@ static void init(grib_accessor* a, const long len , grib_arguments* arg ) long sectionLength; grib_accessor_raw *self =(grib_accessor_raw*)a; grib_expression* e; + grib_handle* hand = grib_handle_of_accessor(a); a->length=0; - self->totalLength = grib_arguments_get_name(grib_handle_of_accessor(a),arg,n++); - self->sectionLength = grib_arguments_get_name(grib_handle_of_accessor(a),arg,n++); + self->totalLength = grib_arguments_get_name(hand,arg,n++); + self->sectionLength = grib_arguments_get_name(hand,arg,n++); - e=grib_arguments_get_expression(grib_handle_of_accessor(a), arg,n++); - grib_expression_evaluate_long(grib_handle_of_accessor(a),e,&(self->relativeOffset)); - if (err) grib_context_log(grib_handle_of_accessor(a)->context,GRIB_LOG_FATAL,"unable to evaluate relativeOffset"); + e=grib_arguments_get_expression(hand, arg,n++); + err = grib_expression_evaluate_long(hand,e,&(self->relativeOffset)); + if (err) grib_context_log(hand->context,GRIB_LOG_ERROR,"unable to evaluate relativeOffset"); - grib_get_long(grib_handle_of_accessor(a),self->sectionLength,§ionLength); + grib_get_long(hand,self->sectionLength,§ionLength); a->length=sectionLength-self->relativeOffset; if (a->length<0) a->length=0; diff --git a/src/grib_bits_any_endian.c b/src/grib_bits_any_endian.c index b547b2dd3..9e017a5bf 100644 --- a/src/grib_bits_any_endian.c +++ b/src/grib_bits_any_endian.c @@ -313,7 +313,7 @@ int grib_encode_unsigned_longb(unsigned char* p, unsigned long val ,long *bitp, { unsigned long maxV = grib_power(nb,2); if (val > maxV) { - fprintf(stderr, "grib_encode_unsigned_longb: Value=%ld, but number of bits=%ld!\n", val, nb); + fprintf(stderr, "grib_encode_unsigned_longb: Value=%lu, but number of bits=%ld!\n", val, nb); Assert(0); } } diff --git a/src/grib_db.c b/src/grib_db.c index b188f1614..a2334ee49 100644 --- a/src/grib_db.c +++ b/src/grib_db.c @@ -35,7 +35,6 @@ static void grib_db_delete_columns(grib_db* db); static int grib_db_columns_resize(grib_db* db,size_t newsize); static int grib_db_column_copy_from_handle(grib_handle* h,grib_db* db,int i); static grib_db* grib_db_create_from_keys(grib_context* c,char** keys,int nkeys,int* err); -static grib_db* grib_db_create_from_keys(grib_context* c,char** keys,int nkeys,int* err); static void grib_fieldset* grib_db_fieldset_create(grib_db* db, int* err); static int grib_fieldset_compare(grib_fieldset* set,int* i,int* j); static void grib_db_sort(grib_set* set, int beg, int theEnd); @@ -286,7 +285,6 @@ static grib_db* grib_db_create_from_keys(grib_context* c,char** keys,int nkeys,i size_t msize=0,size=0; int i=0; int type=0; - grib_context* c=NULL; int default_type=GRIB_TYPE_DOUBLE; if (!c) c=grib_context_get_default( );