remove gcc_unused
[[maybe_unused]] (introduced in C++17) is standard C++. https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused says that this is equivalent to the GNU unused attribute. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@ AvahiRegisterService(AvahiClient *c);
|
||||
static void
|
||||
AvahiGroupCallback(AvahiEntryGroup *g,
|
||||
AvahiEntryGroupState state,
|
||||
gcc_unused void *userdata)
|
||||
[[maybe_unused]] void *userdata)
|
||||
{
|
||||
assert(g != nullptr);
|
||||
|
||||
@@ -149,7 +149,7 @@ AvahiRegisterService(AvahiClient *c)
|
||||
/* Callback when avahi changes state */
|
||||
static void
|
||||
MyAvahiClientCallback(AvahiClient *c, AvahiClientState state,
|
||||
gcc_unused void *userdata)
|
||||
[[maybe_unused]] void *userdata)
|
||||
{
|
||||
assert(c != nullptr);
|
||||
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
protected:
|
||||
/* virtual methods from class SocketMonitor */
|
||||
bool OnSocketReady(gcc_unused unsigned flags) noexcept override {
|
||||
bool OnSocketReady([[maybe_unused]] unsigned flags) noexcept override {
|
||||
DNSServiceProcessResult(service_ref);
|
||||
return true;
|
||||
}
|
||||
@@ -57,12 +57,12 @@ protected:
|
||||
static BonjourMonitor *bonjour_monitor;
|
||||
|
||||
static void
|
||||
dnsRegisterCallback(gcc_unused DNSServiceRef sdRef,
|
||||
gcc_unused DNSServiceFlags flags,
|
||||
dnsRegisterCallback([[maybe_unused]] DNSServiceRef sdRef,
|
||||
[[maybe_unused]] DNSServiceFlags flags,
|
||||
DNSServiceErrorType errorCode, const char *name,
|
||||
gcc_unused const char *regtype,
|
||||
gcc_unused const char *domain,
|
||||
gcc_unused void *context)
|
||||
[[maybe_unused]] const char *regtype,
|
||||
[[maybe_unused]] const char *domain,
|
||||
[[maybe_unused]] void *context)
|
||||
{
|
||||
if (errorCode != kDNSServiceErr_NoError) {
|
||||
LogError(bonjour_domain,
|
||||
|
@@ -50,7 +50,7 @@ static constexpr Domain zeroconf_domain("zeroconf");
|
||||
static int zeroconfEnabled;
|
||||
|
||||
void
|
||||
ZeroconfInit(const ConfigData &config, gcc_unused EventLoop &loop)
|
||||
ZeroconfInit(const ConfigData &config, [[maybe_unused]] EventLoop &loop)
|
||||
{
|
||||
const char *serviceName;
|
||||
|
||||
|
Reference in New Issue
Block a user