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:
Rosen Penev
2020-03-12 12:56:11 -07:00
parent 0afb156a5b
commit 97425d56e7
101 changed files with 226 additions and 234 deletions

View File

@@ -81,9 +81,9 @@ private:
std::chrono::steady_clock::duration Delay() const noexcept override;
static void _FillBuffer(void* cookie, void* _buffer, size_t size,
gcc_unused const media_raw_audio_format& _format);
[[maybe_unused]] const media_raw_audio_format& _format);
void FillBuffer(void* _buffer, size_t size,
gcc_unused const media_raw_audio_format& _format);
[[maybe_unused]] const media_raw_audio_format& _format);
void SendTag(const Tag &tag) override;
};
@@ -154,7 +154,7 @@ HaikuOutput::_FillBuffer(void* cookie, void* buffer, size_t size,
void
HaikuOutput::FillBuffer(void* _buffer, size_t size,
gcc_unused const media_raw_audio_format& _format)
[[maybe_unused]] const media_raw_audio_format& _format)
{
buffer = (uint8*)_buffer;

View File

@@ -53,7 +53,7 @@ private:
: std::chrono::steady_clock::duration::zero();
}
size_t Play(gcc_unused const void *chunk, size_t size) override {
size_t Play([[maybe_unused]] const void *chunk, size_t size) override {
if (sync) {
if (!timer->IsStarted())
timer->Start();

View File

@@ -710,9 +710,9 @@ osx_output_set_device(OSXOutput *oo)
*/
static OSStatus
osx_render(void *vdata,
gcc_unused AudioUnitRenderActionFlags *io_action_flags,
gcc_unused const AudioTimeStamp *in_timestamp,
gcc_unused UInt32 in_bus_number,
[[maybe_unused]] AudioUnitRenderActionFlags *io_action_flags,
[[maybe_unused]] const AudioTimeStamp *in_timestamp,
[[maybe_unused]] UInt32 in_bus_number,
UInt32 in_number_frames,
AudioBufferList *buffer_list)
{

View File

@@ -57,7 +57,7 @@ PipeOutput::PipeOutput(const ConfigBlock &block)
}
inline void
PipeOutput::Open(gcc_unused AudioFormat &audio_format)
PipeOutput::Open([[maybe_unused]] AudioFormat &audio_format)
{
fh = popen(cmd.c_str(), "w");
if (fh == nullptr)

View File

@@ -62,7 +62,7 @@ class PulseOutput final : AudioOutput {
public:
void SetMixer(PulseMixer &_mixer);
void ClearMixer(gcc_unused PulseMixer &old_mixer) {
void ClearMixer([[maybe_unused]] PulseMixer &old_mixer) {
assert(mixer == &old_mixer);
mixer = nullptr;
@@ -277,8 +277,8 @@ pulse_wait_for_operation(struct pa_threaded_mainloop *mainloop,
* the caller thread, to wake pulse_wait_for_operation() up.
*/
static void
pulse_output_stream_success_cb(gcc_unused pa_stream *s,
gcc_unused int success, void *userdata)
pulse_output_stream_success_cb([[maybe_unused]] pa_stream *s,
[[maybe_unused]] int success, void *userdata)
{
PulseOutput &po = *(PulseOutput *)userdata;
@@ -342,7 +342,7 @@ PulseOutput::OnServerLayoutChanged(pa_subscription_event_type_t t,
}
static void
pulse_output_subscribe_cb(gcc_unused pa_context *context,
pulse_output_subscribe_cb([[maybe_unused]] pa_context *context,
pa_subscription_event_type_t t,
uint32_t idx, void *userdata)
{
@@ -508,7 +508,7 @@ PulseOutput::WaitConnection()
}
inline void
PulseOutput::OnStreamSuspended(gcc_unused pa_stream *_stream)
PulseOutput::OnStreamSuspended([[maybe_unused]] pa_stream *_stream)
{
assert(_stream == stream || stream == nullptr);
assert(mainloop != nullptr);
@@ -574,7 +574,7 @@ PulseOutput::OnStreamWrite(size_t nbytes)
}
static void
pulse_output_stream_write_cb(gcc_unused pa_stream *stream, size_t nbytes,
pulse_output_stream_write_cb([[maybe_unused]] pa_stream *stream, size_t nbytes,
void *userdata)
{
PulseOutput &po = *(PulseOutput *)userdata;

View File

@@ -121,7 +121,7 @@ HttpdOutput::OnDeferredBroadcast() noexcept
void
HttpdOutput::OnAccept(UniqueSocketDescriptor fd,
SocketAddress, gcc_unused int uid) noexcept
SocketAddress, [[maybe_unused]] int uid) noexcept
{
/* the listener socket has become readable - a client has
connected */

View File

@@ -111,7 +111,7 @@ private:
* been consumed. It synthesises and enqueues the next
* buffer.
*/
static void PlayedCallback(gcc_unused SLAndroidSimpleBufferQueueItf caller,
static void PlayedCallback([[maybe_unused]] SLAndroidSimpleBufferQueueItf caller,
void *pContext)
{
SlesOutput &sles = *(SlesOutput *)pContext;