]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD/MINOR: stats: fix build warning due to condition always true
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Jun 2015 17:49:52 +0000 (19:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 Jun 2015 17:49:52 +0000 (19:49 +0200)
commit666f5049069e2d05bd31b421f7cffb12545d29af
tree729ce2f5722c5c205f39de48f91eeab117aa7e16
parent22b0a68120e6c7bebe15c4b60dca0acebf32df50
BUILD/MINOR: stats: fix build warning due to condition always true

Dmitry Sivachenko reported the following harmless build warning using Clang :

  src/dumpstats.c:5196:48: warning: address of array 'strm_li(sess)->proto->name'
        will always evaluate to 'true' [-Wpointer-bool-conversion]
    ...strm_li(sess) && strm_li(sess)->proto->name ? strm_li(sess)->proto->nam...
                     ~~ ~~~~~~~~~~~~~~~~~~~~~~^~~~
proto->name cannot be null here as it's the protocol name which is stored
directly in the structure.

The same case is present in 1.5 though the code changed.
src/dumpstats.c