Do not use [[maybe_unused]] for data members with GCC

GCC complains on that with -Wattributes
This commit is contained in:
Martin Pulec
2021-09-13 11:48:21 +02:00
parent 130ac934b4
commit 1326868a01

View File

@@ -80,6 +80,12 @@ public:
unsigned char rtpChannelId, rtcpChannelId;
};
#ifdef __clang__
#define MAYBE_UNUSED_ATTRIBUTE [[maybe_unused]]
#else
#define MAYBE_UNUSED_ATTRIBUTE // GCC complains if [[maybe_used]] is used there
#endif
class BasicRTSPOnlySubsession: public ServerMediaSubsession {
public:
@@ -131,8 +137,8 @@ private:
void setSDPLines();
[[maybe_unused]] Boolean fReuseFirstSource;
[[maybe_unused]] void* fLastStreamToken;
MAYBE_UNUSED_ATTRIBUTE Boolean fReuseFirstSource;
MAYBE_UNUSED_ATTRIBUTE void* fLastStreamToken;
char fCNAME[100];
struct module *fmod;
rtps_types_t avType;