From 405d49c060d8ee91ed146b1087ac1eb6db569ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 10 Nov 2021 21:15:58 +0000 Subject: [PATCH] Type-cast enums to `int` before comparison --- lxroot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxroot.cpp b/lxroot.cpp index 66eb8b8..520bdb6 100644 --- a/lxroot.cpp +++ b/lxroot.cpp @@ -728,8 +728,8 @@ struct Syscall { // xxsy ----------------------------- struct Syscall // the below verbose yet simple implementation should optimize well. - #define if_equal( a, b ) ( a == b ? b : 0 ) - #define if_not_equal( a, b ) ( ( a != b ) && ( n & a ) ? b : 0 ) + #define if_equal( a, b ) ( (int)a == (int)b ? b : 0 ) + #define if_not_equal( a, b ) ( ( (int)a != (int)b ) && ( n & a ) ? b : 0 ) constexpr flags_t copy_these_bits = if_equal ( ST_RDONLY, MS_RDONLY )