diff --git a/src/grib_accessor_class_bufr_data_array.c b/src/grib_accessor_class_bufr_data_array.c index 740863489..6632ade8b 100644 --- a/src/grib_accessor_class_bufr_data_array.c +++ b/src/grib_accessor_class_bufr_data_array.c @@ -1003,7 +1003,7 @@ static int encode_double_value(grib_context* c, grib_buffer* buff, long* pos, bu "ECCODES WARNING : encode_double_value: %s. Value (%g) out of range (minAllowed=%g, maxAllowed=%g)." " Setting it to missing value\n", bd->shortName, value, minAllowed, maxAllowed); - value = GRIB_MISSING_DOUBLE; /* Ignore the bad value and instead use 'missing' */ + /* Ignore the bad value and instead use 'missing' */ grib_set_bits_on(buff->data, pos, modifiedWidth); } else { diff --git a/src/grib_accessor_class_dictionary.c b/src/grib_accessor_class_dictionary.c index 1c88d6905..256d549de 100644 --- a/src/grib_accessor_class_dictionary.c +++ b/src/grib_accessor_class_dictionary.c @@ -329,9 +329,10 @@ static int unpack_string(grib_accessor* a, char* buffer, size_t* len) } *len = rsize; - Assert(buffer); - memcpy(buffer, start, rsize); - buffer[rsize] = 0; + if (buffer && start) { + memcpy(buffer, start, rsize); + buffer[rsize] = 0; + } /* grib_trie_delete(dictionary); */ diff --git a/src/grib_jasper_encoding.c b/src/grib_jasper_encoding.c index d795ece08..f51155929 100644 --- a/src/grib_jasper_encoding.c +++ b/src/grib_jasper_encoding.c @@ -199,9 +199,9 @@ int grib_jasper_encode(grib_context* c, j2k_encode_helper* helper) } helper->jpeg_length = jpcstream->rwcnt_; - jaserr = jas_stream_close(istream); + jas_stream_close(istream); istream = 0; - jaserr = jas_stream_close(jpcstream); + jas_stream_close(jpcstream); jpcstream = 0; cleanup: