From 914ead075e31132b9fd16b0c687ac6125a99cf6b Mon Sep 17 00:00:00 2001 From: Merry Date: Fri, 15 Jul 2022 10:34:38 +0100 Subject: common_funcs: Mark padding as [[maybe_unused]] --- src/common/common_funcs.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index adc31c758..e1e2a90fc 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -18,14 +18,16 @@ /// Helper macros to insert unused bytes or words to properly align structs. These values will be /// zero-initialized. #define INSERT_PADDING_BYTES(num_bytes) \ - std::array CONCAT2(pad, __LINE__) {} + [[maybe_unused]] std::array CONCAT2(pad, __LINE__) {} #define INSERT_PADDING_WORDS(num_words) \ - std::array CONCAT2(pad, __LINE__) {} + [[maybe_unused]] std::array CONCAT2(pad, __LINE__) {} /// These are similar to the INSERT_PADDING_* macros but do not zero-initialize the contents. /// This keeps the structure trivial to construct. -#define INSERT_PADDING_BYTES_NOINIT(num_bytes) std::array CONCAT2(pad, __LINE__) -#define INSERT_PADDING_WORDS_NOINIT(num_words) std::array CONCAT2(pad, __LINE__) +#define INSERT_PADDING_BYTES_NOINIT(num_bytes) \ + [[maybe_unused]] std::array CONCAT2(pad, __LINE__) +#define INSERT_PADDING_WORDS_NOINIT(num_words) \ + [[maybe_unused]] std::array CONCAT2(pad, __LINE__) #ifndef _MSC_VER -- cgit v1.2.3