Skip to content

Commit

Permalink
Remove pointer to bool conversion warnings
Browse files Browse the repository at this point in the history
conffile and print: static array pointer is never null
&e_ae->attributeSet: pointer variable address is never null
  • Loading branch information
jakub-id committed Jun 9, 2024
1 parent bd97d95 commit 21e7b37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/cqltransform.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ const char *cql_lookup_reverse(cql_transform_t ct,
Z_AttributeElement a_ae = *attributes->attributes[j];
if (!compare_attr(e_ae, &a_ae))
break;
if (a_ae.attributeSet && &e_ae->attributeSet &&
if (a_ae.attributeSet && e_ae->attributeSet &&
!oid_oidcmp(a_ae.attributeSet, yaz_oid_attset_bib_1))
a_ae.attributeSet = 0;
if (!compare_attr(e_ae, &a_ae))
Expand Down Expand Up @@ -1046,4 +1046,3 @@ void cql_transform_set_error(cql_transform_t ct, int error, const char *addinfo)
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/

5 changes: 2 additions & 3 deletions util/yaz-icu.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,10 @@ int main(int argc, char **argv)
yaz_enable_panic_backtrace(*argv);
read_params(argc, argv, &config);

if (config.conffile && strlen(config.conffile))
if (strlen(config.conffile))
process_text_file(&config);

if (config.print && strlen(config.print))
if (strlen(config.print))
print_info(&config);

u_cleanup();
Expand All @@ -593,4 +593,3 @@ int main(int argc, char **argv)
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/

0 comments on commit 21e7b37

Please sign in to comment.