From 96534002eff8d3cc9c823886fdff1487ccbafc92 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Fri, 17 Feb 2023 14:17:34 +0100 Subject: [PATCH] bindings: cxx: use C++-style compiler attributes C++ provides a unified syntax for compiler extensions so use them instead of redefining our own. Signed-off-by: Bartosz Golaszewski --- bindings/cxx/edge-event.cpp | 2 +- bindings/cxx/internal.hpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bindings/cxx/edge-event.cpp b/bindings/cxx/edge-event.cpp index 4fa3399..5ff3af2 100644 --- a/bindings/cxx/edge-event.cpp +++ b/bindings/cxx/edge-event.cpp @@ -47,7 +47,7 @@ edge_event::impl_external::impl_external() } ::std::shared_ptr -edge_event::impl_external::copy(const ::std::shared_ptr& self GPIOD_CXX_UNUSED) const +edge_event::impl_external::copy([[maybe_unused]] const ::std::shared_ptr& self) const { ::std::shared_ptr ret(new impl_managed); impl_managed& managed = dynamic_cast(*ret); diff --git a/bindings/cxx/internal.hpp b/bindings/cxx/internal.hpp index 6ad561e..ef239d4 100644 --- a/bindings/cxx/internal.hpp +++ b/bindings/cxx/internal.hpp @@ -13,8 +13,6 @@ #include "gpiod.hpp" -#define GPIOD_CXX_UNUSED __attribute__((unused)) - namespace gpiod { template -- 2.30.2