From: Bartosz Golaszewski Date: Fri, 17 Feb 2023 13:17:34 +0000 (+0100) Subject: bindings: cxx: use C++-style compiler attributes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=96534002eff8d3cc9c823886fdff1487ccbafc92;p=qemu-gpiodev%2Flibgpiod.git 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 --- 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