mirror of https://github.com/ecmwf/eccodes.git
Clang static analyser warnings
This commit is contained in:
parent
deac4b3488
commit
b9ea2a2eef
|
@ -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)."
|
"ECCODES WARNING : encode_double_value: %s. Value (%g) out of range (minAllowed=%g, maxAllowed=%g)."
|
||||||
" Setting it to missing value\n",
|
" Setting it to missing value\n",
|
||||||
bd->shortName, value, minAllowed, maxAllowed);
|
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);
|
grib_set_bits_on(buff->data, pos, modifiedWidth);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -329,9 +329,10 @@ static int unpack_string(grib_accessor* a, char* buffer, size_t* len)
|
||||||
}
|
}
|
||||||
|
|
||||||
*len = rsize;
|
*len = rsize;
|
||||||
Assert(buffer);
|
if (buffer && start) {
|
||||||
memcpy(buffer, start, rsize);
|
memcpy(buffer, start, rsize);
|
||||||
buffer[rsize] = 0;
|
buffer[rsize] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* grib_trie_delete(dictionary); */
|
/* grib_trie_delete(dictionary); */
|
||||||
|
|
||||||
|
|
|
@ -199,9 +199,9 @@ int grib_jasper_encode(grib_context* c, j2k_encode_helper* helper)
|
||||||
}
|
}
|
||||||
|
|
||||||
helper->jpeg_length = jpcstream->rwcnt_;
|
helper->jpeg_length = jpcstream->rwcnt_;
|
||||||
jaserr = jas_stream_close(istream);
|
jas_stream_close(istream);
|
||||||
istream = 0;
|
istream = 0;
|
||||||
jaserr = jas_stream_close(jpcstream);
|
jas_stream_close(jpcstream);
|
||||||
jpcstream = 0;
|
jpcstream = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|
Loading…
Reference in New Issue