From 1551de07de1aa977020d88a009683fb286cb3eaa Mon Sep 17 00:00:00 2001
From: Scott Snyder <scott.snyder@cern.ch>
Date: Thu, 8 Aug 2019 09:10:08 +0000
Subject: [PATCH] VP1Gui: Use [[maybe_unused]]

Replace nonstandard _UNUSED macro with [[maybe_unused]].
---
 graphics/VP1/VP1Base/VP1Base/VP1Msg.h     | 9 +--------
 graphics/VP1/VP1Gui/src/VP1TabManager.cxx | 4 ++--
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/graphics/VP1/VP1Base/VP1Base/VP1Msg.h b/graphics/VP1/VP1Base/VP1Base/VP1Msg.h
index 1f0897865b2..0f72e1ada0a 100644
--- a/graphics/VP1/VP1Base/VP1Base/VP1Msg.h
+++ b/graphics/VP1/VP1Base/VP1Base/VP1Msg.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -21,14 +21,7 @@
 #include "VP1Base/VP1String.h"
 
 
-/* utility function to declare that a variable or a function parameter is unused by design
- * and not that somebody has forgotten about it.
- * Used also for assert() statements; otherwise compiler throw warnings while building
- * in "opt" (release, because the assert() are removed and sometimes the variable used
- * as assert() parameters appear to not be used at all, to the compiler.
- */
 #pragma once
-#define _UNUSED(x) ((void)x)
 
 
 
diff --git a/graphics/VP1/VP1Gui/src/VP1TabManager.cxx b/graphics/VP1/VP1Gui/src/VP1TabManager.cxx
index 5cdd9e735c5..73d8e3d8cc5 100644
--- a/graphics/VP1/VP1Gui/src/VP1TabManager.cxx
+++ b/graphics/VP1/VP1Gui/src/VP1TabManager.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 /////////////////////////////////////////////////////////////
@@ -639,9 +639,9 @@ void VP1TabManager::removeChannel(QString channeluniquename) {
   //delete channel
   cw->hide();
   dw->ensureCWHasNoParent();
+  [[maybe_unused]] //To avoid compile warning in opt mode.
   bool ok=m_d->channelmanager->deleteChannel(cw->unique_name());
   assert(ok);
-  _UNUSED(ok);//To avoid compile warning in opt mode.
 
   //delete dock widget
   delete dw;
-- 
GitLab