Explicitly annotate a few variables

as [[maybe_unused]], avoiding the (void)foo trick.

closes https://github.com/official-stockfish/Stockfish/pull/4162

No functional change
This commit is contained in:
Joost VandeVondele
2022-09-11 21:28:12 +02:00
parent 82bb21dc7a
commit 5a871e174f
2 changed files with 3 additions and 13 deletions

View File

@@ -378,10 +378,9 @@ void std_aligned_free(void* ptr) {
#if defined(_WIN32)
static void* aligned_large_pages_alloc_windows(size_t allocSize) {
static void* aligned_large_pages_alloc_windows([[maybe_unused]] size_t allocSize) {
#if !defined(_WIN64)
(void)allocSize; // suppress unused-parameter compiler warning
return nullptr;
#else
@@ -626,8 +625,7 @@ string argv0; // path+name of the executable binary, as given by argv
string binaryDirectory; // path of the executable directory
string workingDirectory; // path of the working directory
void init(int argc, char* argv[]) {
(void)argc;
void init([[maybe_unused]] int argc, char* argv[]) {
string pathSeparator;
// extract the path+name of the executable binary