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:
@@ -53,7 +53,7 @@ static void flacPrintErroredState(FLAC__StreamDecoderState state)
|
||||
LogError(flac_domain, FLAC__StreamDecoderStateString[state]);
|
||||
}
|
||||
|
||||
static void flacMetadata(gcc_unused const FLAC__StreamDecoder * dec,
|
||||
static void flacMetadata([[maybe_unused]] const FLAC__StreamDecoder * dec,
|
||||
const FLAC__StreamMetadata * block, void *vdata)
|
||||
{
|
||||
auto &fd = *(FlacDecoder *)vdata;
|
||||
@@ -307,7 +307,7 @@ flac_decode(DecoderClient &client, InputStream &input_stream)
|
||||
}
|
||||
|
||||
static bool
|
||||
oggflac_init(gcc_unused const ConfigBlock &block)
|
||||
oggflac_init([[maybe_unused]] const ConfigBlock &block)
|
||||
{
|
||||
return !!FLAC_API_SUPPORTS_OGG_FLAC;
|
||||
}
|
||||
|
@@ -98,7 +98,7 @@ FlacInput::Error(FLAC__StreamDecoderErrorStatus status)
|
||||
}
|
||||
|
||||
FLAC__StreamDecoderReadStatus
|
||||
FlacInput::Read(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
FlacInput::Read([[maybe_unused]] const FLAC__StreamDecoder *flac_decoder,
|
||||
FLAC__byte buffer[], size_t *bytes,
|
||||
void *client_data)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ FlacInput::Read(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
}
|
||||
|
||||
FLAC__StreamDecoderSeekStatus
|
||||
FlacInput::Seek(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
FlacInput::Seek([[maybe_unused]] const FLAC__StreamDecoder *flac_decoder,
|
||||
FLAC__uint64 absolute_byte_offset, void *client_data)
|
||||
{
|
||||
auto *i = (FlacInput *)client_data;
|
||||
@@ -117,7 +117,7 @@ FlacInput::Seek(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
}
|
||||
|
||||
FLAC__StreamDecoderTellStatus
|
||||
FlacInput::Tell(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
FlacInput::Tell([[maybe_unused]] const FLAC__StreamDecoder *flac_decoder,
|
||||
FLAC__uint64 *absolute_byte_offset, void *client_data)
|
||||
{
|
||||
auto *i = (FlacInput *)client_data;
|
||||
@@ -126,7 +126,7 @@ FlacInput::Tell(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
}
|
||||
|
||||
FLAC__StreamDecoderLengthStatus
|
||||
FlacInput::Length(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
FlacInput::Length([[maybe_unused]] const FLAC__StreamDecoder *flac_decoder,
|
||||
FLAC__uint64 *stream_length, void *client_data)
|
||||
{
|
||||
auto *i = (FlacInput *)client_data;
|
||||
@@ -135,7 +135,7 @@ FlacInput::Length(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
}
|
||||
|
||||
FLAC__bool
|
||||
FlacInput::Eof(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
FlacInput::Eof([[maybe_unused]] const FLAC__StreamDecoder *flac_decoder,
|
||||
void *client_data)
|
||||
{
|
||||
auto *i = (FlacInput *)client_data;
|
||||
@@ -144,7 +144,7 @@ FlacInput::Eof(gcc_unused const FLAC__StreamDecoder *flac_decoder,
|
||||
}
|
||||
|
||||
void
|
||||
FlacInput::Error(gcc_unused const FLAC__StreamDecoder *decoder,
|
||||
FlacInput::Error([[maybe_unused]] const FLAC__StreamDecoder *decoder,
|
||||
FLAC__StreamDecoderErrorStatus status, void *client_data)
|
||||
{
|
||||
auto *i = (FlacInput *)client_data;
|
||||
|
@@ -196,7 +196,7 @@ fluidsynth_file_decode(DecoderClient &client, Path path_fs)
|
||||
|
||||
static bool
|
||||
fluidsynth_scan_file(Path path_fs,
|
||||
gcc_unused TagHandler &handler) noexcept
|
||||
[[maybe_unused]] TagHandler &handler) noexcept
|
||||
{
|
||||
return fluid_is_midifile(path_fs.c_str());
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ static int gme_accuracy;
|
||||
#endif
|
||||
|
||||
static bool
|
||||
gme_plugin_init(gcc_unused const ConfigBlock &block)
|
||||
gme_plugin_init([[maybe_unused]] const ConfigBlock &block)
|
||||
{
|
||||
#if GME_VERSION >= 0x000600
|
||||
auto accuracy = block.GetBlockParam("accuracy");
|
||||
|
@@ -37,7 +37,7 @@
|
||||
static constexpr Domain mpg123_domain("mpg123");
|
||||
|
||||
static bool
|
||||
mpd_mpg123_init(gcc_unused const ConfigBlock &block)
|
||||
mpd_mpg123_init([[maybe_unused]] const ConfigBlock &block)
|
||||
{
|
||||
mpg123_init();
|
||||
|
||||
|
@@ -64,7 +64,7 @@ IsOpusTags(const ogg_packet &packet) noexcept
|
||||
}
|
||||
|
||||
bool
|
||||
mpd_opus_init(gcc_unused const ConfigBlock &block)
|
||||
mpd_opus_init([[maybe_unused]] const ConfigBlock &block)
|
||||
{
|
||||
LogDebug(opus_domain, opus_get_version_string());
|
||||
|
||||
|
@@ -34,7 +34,7 @@
|
||||
static constexpr Domain sndfile_domain("sndfile");
|
||||
|
||||
static bool
|
||||
sndfile_init(gcc_unused const ConfigBlock &block)
|
||||
sndfile_init([[maybe_unused]] const ConfigBlock &block)
|
||||
{
|
||||
LogDebug(sndfile_domain, sf_version_string());
|
||||
return true;
|
||||
@@ -109,9 +109,9 @@ sndfile_vio_read(void *ptr, sf_count_t count, void *user_data)
|
||||
}
|
||||
|
||||
static sf_count_t
|
||||
sndfile_vio_write(gcc_unused const void *ptr,
|
||||
gcc_unused sf_count_t count,
|
||||
gcc_unused void *user_data)
|
||||
sndfile_vio_write([[maybe_unused]] const void *ptr,
|
||||
[[maybe_unused]] sf_count_t count,
|
||||
[[maybe_unused]] void *user_data)
|
||||
{
|
||||
/* no writing! */
|
||||
return -1;
|
||||
|
@@ -311,7 +311,7 @@ VorbisDecoder::OnOggEnd()
|
||||
/* public */
|
||||
|
||||
static bool
|
||||
vorbis_init(gcc_unused const ConfigBlock &block)
|
||||
vorbis_init([[maybe_unused]] const ConfigBlock &block)
|
||||
{
|
||||
#ifndef HAVE_TREMOR
|
||||
LogDebug(vorbis_domain, vorbis_version_string());
|
||||
|
@@ -143,7 +143,7 @@ format_samples_int(void *buffer, uint32_t count)
|
||||
* No conversion necessary.
|
||||
*/
|
||||
static void
|
||||
format_samples_nop(gcc_unused void *buffer, gcc_unused uint32_t count)
|
||||
format_samples_nop([[maybe_unused]] void *buffer, [[maybe_unused]] uint32_t count)
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
Reference in New Issue
Block a user