From 7a6b573b00f5e031da541afeae206866f76a9200 Mon Sep 17 00:00:00 2001 From: Bart De Vos Date: Mon, 6 Nov 2023 17:23:33 +0100 Subject: [PATCH] libosdp/utils/include/utils/utils.h:31: warning: "BIT" redefined Using gcc 8.4.0 throws this warning: libosdp/utils/include/utils/utils.h:31: warning: "BIT" redefined #define BIT(n) (1ull << (n)) It's safe to conditionally define this --- include/utils/utils.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/utils/utils.h b/include/utils/utils.h index a0d2605..1444543 100644 --- a/include/utils/utils.h +++ b/include/utils/utils.h @@ -28,7 +28,9 @@ #define BYTE_2(x) (uint8_t)(((x) >> 16) & 0xFF) #define BYTE_3(x) (uint8_t)(((x) >> 24) & 0xFF) +#ifndef BIT #define BIT(n) (1ull << (n)) +#endif #define MASK(n) (BIT((n) + 1) - 1) #define BIT_IS_SET(m, n) (bool)((m) & BIT(n)) #define BIT_SET(m, n) ((m) |= BIT(n))