DALnet / bahamut

The Bahamut IRC Daemon
http://www.dal.net/?page=Bahamut
Other
57 stars 42 forks source link

-Wpointer-bool-conversion warnings #225

Open ryandesign opened 1 year ago

ryandesign commented 1 year ago

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->
                        ~~ ~~~~~~~~~~~~^~~~~~~~