Clang static analyser: Null pointer argument in call to string comparison function

This commit is contained in:
Shahram Najm 2020-02-12 11:13:03 +00:00
parent 5dc2e13c6c
commit f0c9c361e0
3 changed files with 3 additions and 0 deletions

View File

@ -180,6 +180,7 @@ static double compare_double_relative(double* a, double* b, double* err)
static int blacklisted(const char* name)
{
grib_string_list* b = blacklist;
if (!name) return 0;
while (b) {
Assert(b->value);
if (!strcmp(name, b->value))

View File

@ -93,6 +93,7 @@ static void write_messages(grib_handle* h1, grib_handle* h2)
static int blacklisted(const char* name)
{
grib_string_list* b = blacklist;
if (!name) return 0;
while (b) {
Assert(b->value);
if (!strcmp(name, b->value))

View File

@ -140,6 +140,7 @@ static double compare_double_relative(double* a, double* b, double* err)
static int blacklisted(const char* name)
{
grib_string_list* b = blacklist;
if (!name) return 0;
while (b) {
Assert(b->value);
if (!strcmp(name, b->value))