bahamut icon indicating copy to clipboard operation
bahamut copied to clipboard

-Wpointer-bool-conversion warnings

Open ryandesign opened this issue 2 years ago • 0 comments

These warnings appears when compiling with a modern Clang compiler:

scache.c:101:15: warning: address of array 'ptr->name' will always evaluate to 'true' [-Wpointer-bool-conversion]
            if (ptr->name)
            ~~  ~~~~~^~~~
ssl.c:352:30: warning: address of array 'sptr->user->username' will always evaluate to 'true' [-Wpointer-bool-conversion]
                (sptr->user && sptr->user->username) ? sptr->user->
                            ~~ ~~~~~~~~~~~~^~~~~~~~
ssl.c:358:40: warning: address of array 'sptr->user->username' will always evaluate to 'true' [-Wpointer-bool-conversion]
            (sptr->user && sptr->user->username) ? sptr->user->
                        ~~ ~~~~~~~~~~~~^~~~~~~~

ryandesign avatar Jul 06 '23 20:07 ryandesign