From 233c0a586da969213135a717d55c1c79171a7bae Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 9 Sep 2022 17:35:05 +0200 Subject: [PATCH] BUILD: flags: fix build warning in some macros used by show_flags Some gcc versions seem to be upset by the use of enums as booleans, so OK, let's cast all of them as uint, that's no big deal. --- include/haproxy/show_flags-t.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/haproxy/show_flags-t.h b/include/haproxy/show_flags-t.h index 72176618b1..5b14b63297 100644 --- a/include/haproxy/show_flags-t.h +++ b/include/haproxy/show_flags-t.h @@ -56,8 +56,8 @@ size_t _ret = 0; \ unsigned int _flg0 = (_flg); \ do { __VA_ARGS__; } while (0); \ - (_flg) &= ~(_val); \ - if (!(_val) && !(_flg)) \ + (_flg) &= ~(unsigned int)(_val); \ + if (!((unsigned int)_val) && !(_flg)) \ _ret = snprintf(_buf, _len, "0%s", \ (_flg) ? (_del) : ""); \ else if ((_flg0) & (_val)) { \ -- 2.47.3