aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-02-17 14:17:34 +0100
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-02-17 14:17:34 +0100
commit96534002eff8d3cc9c823886fdff1487ccbafc92 (patch)
tree27507bbed6cacc61a14927790c1fa5b17fae536e
parent2fced031a3287c992a8ed90b57af78909c616488 (diff)
downloadlibgpiod-96534002eff8d3cc9c823886fdff1487ccbafc92.tar.gz
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 <bartosz.golaszewski@linaro.org>
-rw-r--r--bindings/cxx/edge-event.cpp2
-rw-r--r--bindings/cxx/internal.hpp2
2 files changed, 1 insertions, 3 deletions
diff --git a/bindings/cxx/edge-event.cpp b/bindings/cxx/edge-event.cpp
index 4fa33992..5ff3af26 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>
-edge_event::impl_external::copy(const ::std::shared_ptr<impl>& self GPIOD_CXX_UNUSED) const
+edge_event::impl_external::copy([[maybe_unused]] const ::std::shared_ptr<impl>& self) const
{
::std::shared_ptr<impl> ret(new impl_managed);
impl_managed& managed = dynamic_cast<impl_managed&>(*ret);
diff --git a/bindings/cxx/internal.hpp b/bindings/cxx/internal.hpp
index 6ad561ef..ef239d4c 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<class cxx_enum_type, class c_enum_type>