A PGI compiler warning is triggered by expressions like
ptr == NULL ? NULL : ptr
that the PGI compiler handles incorrectly. It chooses the pointer type
of the first option (void*) and warns about conversion of the second
without a cast. Flip the expression logic to
ptr != NULL ? ptr : NULL
to help the compiler choose the proper result type.
_archive_filter_name(struct archive *_a, int n)
{
struct archive_read_filter *f = get_filter(_a, n);
- return f == NULL ? NULL : f->name;
+ return f != NULL ? f->name : NULL;
}
static int64_t
}
archive_set_error(&a->archive, err,
"Internal error initializing decompressor: %s",
- detail == NULL ? "??" : detail);
+ detail != NULL ? detail : "??");
zip->bzstream_valid = 0;
return (ARCHIVE_FAILED);
}
_archive_filter_name(struct archive *_a, int n)
{
struct archive_write_filter *f = filter_lookup(_a, n);
- return f == NULL ? NULL : f->name;
+ return f != NULL ? f->name : NULL;
}
static int64_t