mirror of https://github.com/ecmwf/eccodes.git
Clang static analysis fixes
This commit is contained in:
parent
fc4550cbf2
commit
7924c3f5a1
|
@ -258,7 +258,7 @@ static int unpack_long (grib_accessor* a, long* v, size_t *len)
|
|||
static int unpack_double (grib_accessor* a, double *v, size_t *len)
|
||||
{
|
||||
size_t l=1;
|
||||
long val;
|
||||
long val=0;
|
||||
int err = unpack_long (a , &val, &l);
|
||||
|
||||
*v = (double)val;
|
||||
|
|
|
@ -1365,6 +1365,7 @@ void *wmo_read_taf_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t
|
|||
|
||||
u.buffer = NULL;
|
||||
|
||||
r.message_size = 0;
|
||||
r.read_data = f;
|
||||
r.read = &stdio_read;
|
||||
r.seek = &stdio_seek;
|
||||
|
|
|
@ -77,7 +77,7 @@ void grib_oarray_delete(grib_context* c,grib_oarray* v)
|
|||
void grib_oarray_delete_content(grib_context* c,grib_oarray* v)
|
||||
{
|
||||
int i;
|
||||
if (!v | !v->v) return;
|
||||
if (!v || !v->v) return;
|
||||
if (!c) grib_context_get_default();
|
||||
for (i=0;i<v->n;i++) {
|
||||
if (v->v[i]) grib_context_free(c,v->v[i]);
|
||||
|
|
|
@ -77,7 +77,7 @@ void grib_sarray_delete(grib_context* c,grib_sarray* v)
|
|||
void grib_sarray_delete_content(grib_context* c,grib_sarray* v)
|
||||
{
|
||||
int i;
|
||||
if (!v | !v->v) return;
|
||||
if (!v || !v->v) return;
|
||||
if (!c) grib_context_get_default();
|
||||
for (i=0;i<v->n;i++) {
|
||||
if (v->v[i]) grib_context_free(c,v->v[i]);
|
||||
|
|
|
@ -228,6 +228,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
if (bitmap) free(bitmap);
|
||||
|
||||
free(data_values);
|
||||
free(missing_string);
|
||||
if (iter) {
|
||||
free(lats);
|
||||
free(lons);
|
||||
|
|
Loading…
Reference in New Issue