tests: Silence Clang 16 warnings (#679)

I was trying to build with clang 16 and ran into these -Werror warnings

Change-Id: I9207990fcfe9c1a5485945294969f21d1d812a7c
This commit is contained in:
Alexander Richardson
2023-12-18 14:57:11 -08:00
committed by GitHub
parent b42d9fabf7
commit 2700f392cb
2 changed files with 2 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ containingFunc(uint64_t init_val, uint64_t fieldVal)
// Declare these as global so g++ doesn't ignore them. Initialize them in
// various ways.
EmptySixtyFour emptySixtyFour = 0;
EmptyThirtyTwo emptyThirtyTwo{};
[[maybe_unused]] EmptyThirtyTwo emptyThirtyTwo{};
[[maybe_unused]] EmptySixteen emptySixteen;
EmptyEight emptyEight(0);

View File

@@ -90,7 +90,7 @@
// This version is for macros which are statement-like, which frequently use
// "do {} while (0)" to make their syntax look more like normal c++ statements.
# define GEM5_DEPRECATED_MACRO_STMT(name, definition, message) \
do {{definition;} GEM5_DEPRECATED_MACRO(name, {}, message);} while (0)
do {{definition;} GEM5_DEPRECATED_MACRO(name, ({}), message);} while (0)
// To mark a class as deprecated in favor of a new name, add a respective
// instance of this macro to the file that used to declare the old name.