summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-07-15 12:02:48 +0200
committerGitHub <noreply@github.com>2022-07-15 12:02:48 +0200
commitd2c0b45bca8a42f30001e0deaf4e0921a7efbee4 (patch)
tree9433b1fea38e20a15bd8817d539b600747bfbb2c /src
parentMerge pull request #8588 from merryhime/IBinder-vdestruct (diff)
parentcommon_funcs: Mark padding as [[maybe_unused]] (diff)
downloadyuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.tar
yuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.tar.gz
yuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.tar.bz2
yuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.tar.lz
yuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.tar.xz
yuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.tar.zst
yuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.zip
Diffstat (limited to 'src')
-rw-r--r--src/common/common_funcs.h10
1 files changed, 6 insertions, 4 deletions
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<u8, num_bytes> CONCAT2(pad, __LINE__) {}
+ [[maybe_unused]] std::array<u8, num_bytes> CONCAT2(pad, __LINE__) {}
#define INSERT_PADDING_WORDS(num_words) \
- std::array<u32, num_words> CONCAT2(pad, __LINE__) {}
+ [[maybe_unused]] std::array<u32, num_words> 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<u8, num_bytes> CONCAT2(pad, __LINE__)
-#define INSERT_PADDING_WORDS_NOINIT(num_words) std::array<u32, num_words> CONCAT2(pad, __LINE__)
+#define INSERT_PADDING_BYTES_NOINIT(num_bytes) \
+ [[maybe_unused]] std::array<u8, num_bytes> CONCAT2(pad, __LINE__)
+#define INSERT_PADDING_WORDS_NOINIT(num_words) \
+ [[maybe_unused]] std::array<u32, num_words> CONCAT2(pad, __LINE__)
#ifndef _MSC_VER