From: Olivier Houchard Date: Tue, 16 Oct 2018 16:49:26 +0000 (+0200) Subject: MINOR: peers: use defines instead of enums to appease clang. X-Git-Tag: v1.9-dev4~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33992267aac00d7e8ae67e0703bf7fffc9cf9b54;p=thirdparty%2Fhaproxy.git MINOR: peers: use defines instead of enums to appease clang. Clang (rightfully) warns that we're trying to set chars to values >= 128. Use defines with hex values instead of an enum to address this. --- diff --git a/src/peers.c b/src/peers.c index c16617d909..64d5e085d9 100644 --- a/src/peers.c +++ b/src/peers.c @@ -120,15 +120,13 @@ enum { /* Note: ids >= 128 contains */ /* id message cotains data */ /*******************************/ -enum { - PEER_MSG_STKT_UPDATE = 128, - PEER_MSG_STKT_INCUPDATE, - PEER_MSG_STKT_DEFINE, - PEER_MSG_STKT_SWITCH, - PEER_MSG_STKT_ACK, - PEER_MSG_STKT_UPDATE_TIMED, - PEER_MSG_STKT_INCUPDATE_TIMED, -}; +#define PEER_MSG_STKT_UPDATE 0x80 +#define PEER_MSG_STKT_INCUPDATE 0x81 +#define PEER_MSG_STKT_DEFINE 0x82 +#define PEER_MSG_STKT_SWITCH 0x83 +#define PEER_MSG_STKT_ACK 0x84 +#define PEER_MSG_STKT_UPDATE_TIMED 0x85 +#define PEER_MSG_STKT_INCUPDATE_TIMED 0x86 /**********************************/ /* Peer Session IO handler states */