From b3529dde98631e07e5e944cfa3794399e42dcc31 Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Sun, 21 Feb 2021 17:09:23 +0200 Subject: definitions: silence a warning. Using the unlinekely macro with e.g. functions returning a pointer would result in "integer from pointer without a cast" warning. This patch works around that and silences such warnings. Signed-off-by: Gediminas Jakutis --- include/rin/definitions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/rin/definitions.h b/include/rin/definitions.h index 75e4da0..201c0b3 100644 --- a/include/rin/definitions.h +++ b/include/rin/definitions.h @@ -32,7 +32,7 @@ /* optimizing likely / unlikely branches */ # define likely(a) (__builtin_expect(!!(a), 1)) -# define unlikely(a) (__builtin_expect((a), 0)) +# define unlikely(a) (__builtin_expect(!!(a), 0)) /* MSVC */ #elif defined(_MSC_VER) -- cgit v1.2.3