]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: peers: use defines instead of enums to appease clang.
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 16 Oct 2018 16:49:26 +0000 (18:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Oct 2018 17:31:15 +0000 (19:31 +0200)
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.

src/peers.c

index c16617d9098efd8a183cc7a8d4be2e7e82c9a54b..64d5e085d90df4baeac2008f44d82964d824691d 100644 (file)
@@ -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 */