From 2c2df4e098463682ba4755f61fec09ba06ded98f Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Wed, 17 Oct 2018 13:13:23 +0200 Subject: [PATCH] C: Added a trick to suppress compilation warnings about an unused function actually called in a macro --- src/obitypes.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/obitypes.h b/src/obitypes.h index c6e9402..8d72880 100644 --- a/src/obitypes.h +++ b/src/obitypes.h @@ -29,6 +29,7 @@ #define OBIQual_int_NA (NULL) /**< NA value for the type OBI_QUAL if the quality is in integer format */ #define OBITuple_NA (NULL) /**< NA value for tuples of any type */ + /** * @brief enum for the boolean OBIType. */ @@ -93,6 +94,16 @@ static double float_NA(void) } +/** + * @brief Trick to suppress compilation warnings about unused + * float_NA function actually called in macro. + */ +static inline void suppress_warning(void) { + (void)float_NA; + (void)suppress_warning; +} + + /** * @brief Returns the memory size in bytes of an OBIType. *