mirror of https://github.com/ecmwf/eccodes.git
Clang static analyser warnings
This commit is contained in:
parent
3d68a32d01
commit
d5a7d4dfc6
|
@ -238,6 +238,7 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
|||
|
||||
if (*len != rlen) {
|
||||
ret = grib_set_long(grib_handle_of_accessor(a), self->numberOfElements, (*len) - 1);
|
||||
if (ret) return ret;
|
||||
}
|
||||
|
||||
ret = grib_get_long(grib_handle_of_accessor(a), self->numberOfBits, &numberOfBits);
|
||||
|
|
|
@ -1017,7 +1017,6 @@ grib_handle* bufr_new_from_file(grib_context* c, FILE* f, int* error)
|
|||
if (gts_header) memcpy(gl->gts_header, gts_header, gtslen);
|
||||
gl->gts_header_len = gtslen;
|
||||
grib_context_free(c, save_gts_header);
|
||||
gtslen = 0;
|
||||
}
|
||||
else {
|
||||
gl->gts_header = NULL;
|
||||
|
|
|
@ -247,7 +247,10 @@ static void gaussian_grid(grib_handle* h)
|
|||
last_n = n;
|
||||
}
|
||||
|
||||
values[0] = rint(values[0]*1e6)/1e6;
|
||||
assert(values);
|
||||
if (values) {
|
||||
values[0] = rint(values[0]*1e6)/1e6;
|
||||
}
|
||||
|
||||
if ( !DBL_EQUAL(north, values[0], tolerance) || !DBL_EQUAL(south, -values[0], tolerance) )
|
||||
printf("N=%ld north=%f south=%f v(=gauss_lat[0])=%f north-v=%0.30f south-v=%0.30f\n",
|
||||
|
|
|
@ -124,7 +124,8 @@ int grib_tool_init(grib_runtime_options* options)
|
|||
exit(1);
|
||||
}
|
||||
}
|
||||
if (*p == ',') {
|
||||
Assert(p);
|
||||
if (p && *p == ',') {
|
||||
p++;
|
||||
options->latlon_mask = strdup(p);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue