Browse files

Compiler: Use [[maybe_unused]] in the Windows DOLPHIN_UNUSED macro

The required version of MSVC already supports [[maybe_unused]], so we
can utilize this here. When GCC 7 and clang 3.9 become hard
requirements, we can eliminate this macro entirely and replace it with
  • Loading branch information...
lioncash committed Jun 9, 2018
1 parent d8f6d60 commit 7b11ce3dd290b2f34164074cc493ea9e0c197fdf
Showing with 3 additions and 2 deletions.
  1. +3 −2 Source/Core/Common/Compiler.h
@@ -4,12 +4,13 @@
#pragma once
// TODO: Replace this with [[maybe_unused]] directly when GCC 7 and clang 3.9
// are hard requirements.
#if defined(__GNUC__) || __clang__
// Disable "unused function" warnings for the ones manually marked as such.
#define DOLPHIN_UNUSED __attribute__((unused))
// Not sure MSVC even checks this...
#define DOLPHIN_UNUSED [[maybe_unused]]
#ifdef _WIN32

0 comments on commit 7b11ce3

Please sign in to comment.