diff options
| author | 2022-07-15 06:02:48 -0400 | |
|---|---|---|
| committer | 2022-07-15 06:02:48 -0400 | |
| commit | d2c0b45bca8a42f30001e0deaf4e0921a7efbee4 (patch) | |
| tree | 9433b1fea38e20a15bd8817d539b600747bfbb2c /src/common/common_funcs.h | |
| parent | Merge pull request #8588 from merryhime/IBinder-vdestruct (diff) | |
| parent | common_funcs: Mark padding as [[maybe_unused]] (diff) | |
| download | yuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.tar.gz yuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.tar.xz yuzu-d2c0b45bca8a42f30001e0deaf4e0921a7efbee4.zip | |
Merge pull request #8587 from merryhime/padding-unused
common_funcs: Mark padding as [[maybe_unused]]
Diffstat (limited to 'src/common/common_funcs.h')
| -rw-r--r-- | src/common/common_funcs.h | 10 |
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 @@ | |||
| 18 | /// Helper macros to insert unused bytes or words to properly align structs. These values will be | 18 | /// Helper macros to insert unused bytes or words to properly align structs. These values will be |
| 19 | /// zero-initialized. | 19 | /// zero-initialized. |
| 20 | #define INSERT_PADDING_BYTES(num_bytes) \ | 20 | #define INSERT_PADDING_BYTES(num_bytes) \ |
| 21 | std::array<u8, num_bytes> CONCAT2(pad, __LINE__) {} | 21 | [[maybe_unused]] std::array<u8, num_bytes> CONCAT2(pad, __LINE__) {} |
| 22 | #define INSERT_PADDING_WORDS(num_words) \ | 22 | #define INSERT_PADDING_WORDS(num_words) \ |
| 23 | std::array<u32, num_words> CONCAT2(pad, __LINE__) {} | 23 | [[maybe_unused]] std::array<u32, num_words> CONCAT2(pad, __LINE__) {} |
| 24 | 24 | ||
| 25 | /// These are similar to the INSERT_PADDING_* macros but do not zero-initialize the contents. | 25 | /// These are similar to the INSERT_PADDING_* macros but do not zero-initialize the contents. |
| 26 | /// This keeps the structure trivial to construct. | 26 | /// This keeps the structure trivial to construct. |
| 27 | #define INSERT_PADDING_BYTES_NOINIT(num_bytes) std::array<u8, num_bytes> CONCAT2(pad, __LINE__) | 27 | #define INSERT_PADDING_BYTES_NOINIT(num_bytes) \ |
| 28 | #define INSERT_PADDING_WORDS_NOINIT(num_words) std::array<u32, num_words> CONCAT2(pad, __LINE__) | 28 | [[maybe_unused]] std::array<u8, num_bytes> CONCAT2(pad, __LINE__) |
| 29 | #define INSERT_PADDING_WORDS_NOINIT(num_words) \ | ||
| 30 | [[maybe_unused]] std::array<u32, num_words> CONCAT2(pad, __LINE__) | ||
| 29 | 31 | ||
| 30 | #ifndef _MSC_VER | 32 | #ifndef _MSC_VER |
| 31 | 33 | ||