Clang static analyser warnings

This commit is contained in:
Shahram Najm 2020-02-19 16:39:06 +00:00
parent 55139ff1f6
commit 08e73e71e5
7 changed files with 6 additions and 7 deletions

View File

@ -258,7 +258,7 @@ static int push_file(FILE* f,char* buffer)
static void _push_handle(grib_handle *h,int *gid)
{
l_grib_handle* current= handle_set;
l_grib_handle* current= NULL;
l_grib_handle* previous= handle_set;
l_grib_handle* the_new= NULL;
int myindex= 1;

View File

@ -272,7 +272,7 @@ static int reverse_rows(unsigned long* data, long len, long number_along_paralle
{
long i = 0;
long left = 0;
long right = number_along_parallel - 1;
long right = 0;
long tmp = 0;
long inc;

View File

@ -254,7 +254,7 @@ static void destroy(grib_context* c, grib_accessor* a)
grib_accessor_md5* self = (grib_accessor_md5*)a;
if (self->blacklist) {
grib_string_list* next = self->blacklist;
grib_string_list* cur = self->blacklist;
grib_string_list* cur = NULL;
while (next) {
cur = next;
next = next->next;

View File

@ -227,7 +227,7 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len)
val[length] = 0;
len[0] = length;
return GRIB_SUCCESS;
return err;
}
static int pack_string(grib_accessor* a, const char* val, size_t* len)

View File

@ -1141,7 +1141,6 @@ static grib_handle* grib_handle_new_from_file_no_multi(grib_context* c, FILE* f,
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;

View File

@ -112,7 +112,7 @@ unsigned long grib_ibm_to_long(double x)
unsigned long s = 0;
unsigned long mmax = 0xffffff;
unsigned long mmin = 0x800000;
unsigned long m = mmax;
unsigned long m = 0;
unsigned long e = 0;
double rmmax = mmax + 0.5;

View File

@ -104,7 +104,7 @@ static void new_keys_list()
static void release_keys_list()
{
grib_string_list* next = keys_list;
grib_string_list* cur = keys_list;
grib_string_list* cur = NULL;
grib_context* c = grib_context_get_default();
while (next) {
cur = next;