]> git.kaiwu.me - haproxy.git/commit
BUILD: server: fix build warnings introduced by load-server-state
authorWilly Tarreau <w@1wt.eu>
Tue, 29 Sep 2015 16:32:57 +0000 (18:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Sep 2015 16:32:57 +0000 (18:32 +0200)
commite1aebb2994a799dc67e61bd28cfef4fc7987d8c2
tree8da924556f0eb6bcd15c3774d3c4863a7774fa7a
parentae459f3b9f9810d18aaa090264398dee2d4de23b
BUILD: server: fix build warnings introduced by load-server-state

Commit e11cfcd ("MINOR: config: new backend directives:
load-server-state-from-file and server-state-file-name") caused these
warnings when building with Clang :

src/server.c:1972:21: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                            (srv_uweight < 0) || (srv_uweight > SRV_UWGHT_MAX))
                             ~~~~~~~~~~~ ^ ~
src/server.c:1980:21: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                            (srv_iweight < 0) || (srv_iweight > SRV_UWGHT_MAX))
                             ~~~~~~~~~~~ ^ ~

Indeed, srv_iweight and srv_uweight are unsigned. Just drop the offending test.
src/server.c