From 6602de8527bf6b3409bd662376857c938efe6c15 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 19 Aug 2020 04:28:38 +0000 Subject: [PATCH] added a static assertion in lib/hawk-cmn.h --- hawk/lib/hawk-cmn.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hawk/lib/hawk-cmn.h b/hawk/lib/hawk-cmn.h index 408507f7..4d99d1bf 100644 --- a/hawk/lib/hawk-cmn.h +++ b/hawk/lib/hawk-cmn.h @@ -1331,8 +1331,12 @@ typedef enum hawk_log_mask_t hawk_log_mask_t; # define HAWK_UT(txt) (u ## txt) #else # define HAWK_UT(txt) (L ## txt) + + /* if this assertion fails, you should check the compiler flags determining the sizeof wchar_t */ + HAWK_STATIC_ASSERT (sizeof(HAWK_UT('X')) == HAWK_SIZEOF_UCH_T); #endif + /** \def HAWK_T * The #HAWK_T macro maps to #HAWK_BT if #HAWK_OOCH_IS_BCH is defined, and to * #HAWK_UT if #HAWK_OOCH_IS_UCH is defined.