bindings: cxx: use C++-style compiler attributes
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 17 Feb 2023 13:17:34 +0000 (14:17 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 17 Feb 2023 13:17:34 +0000 (14:17 +0100)
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>
bindings/cxx/edge-event.cpp
bindings/cxx/internal.hpp

index 4fa33992fbcd76d55f65e95ec1c4e753976cf936..5ff3af26ae144e26dd455adda3c286afa1f3edc8 100644 (file)
@@ -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);
index 6ad561ef30ac41e109ba8e0718ee78b998dbed70..ef239d4c45c79af6649cf65dbf989abe32568f0a 100644 (file)
@@ -13,8 +13,6 @@
 
 #include "gpiod.hpp"
 
-#define GPIOD_CXX_UNUSED       __attribute__((unused))
-
 namespace gpiod {
 
 template<class cxx_enum_type, class c_enum_type>