Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
256cfc54
Commit
256cfc54
authored
Mar 16, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branches 'neheb/fwhfggwe', 'neheb/nvm2', 'neheb/nvm22',…
Merge remote-tracking branches 'neheb/fwhfggwe', 'neheb/nvm2', 'neheb/nvm22', 'neheb/bvm' and 'neheb/cl2'
parents
77c6c3fa
7f10e7a6
e25a3d17
88d56c01
97425d56
Hide whitespace changes
Inline
Side-by-side
Showing
116 changed files
with
253 additions
and
262 deletions
+253
-262
Chrono.hxx
src/Chrono.hxx
+2
-2
CommandLine.cxx
src/CommandLine.cxx
+2
-2
Instance.cxx
src/Instance.cxx
+2
-2
LogInit.cxx
src/LogInit.cxx
+1
-1
AllCommands.cxx
src/command/AllCommands.cxx
+4
-4
ClientCommands.cxx
src/command/ClientCommands.cxx
+4
-4
MessageCommands.cxx
src/command/MessageCommands.cxx
+2
-2
NeighborCommands.cxx
src/command/NeighborCommands.cxx
+1
-1
OtherCommands.cxx
src/command/OtherCommands.cxx
+7
-7
OutputCommands.cxx
src/command/OutputCommands.cxx
+1
-1
PlayerCommands.cxx
src/command/PlayerCommands.cxx
+22
-22
PlaylistCommands.cxx
src/command/PlaylistCommands.cxx
+12
-12
QueueCommands.cxx
src/command/QueueCommands.cxx
+12
-12
StorageCommands.cxx
src/command/StorageCommands.cxx
+1
-1
Interface.hxx
src/db/Interface.hxx
+2
-2
ProxyDatabasePlugin.cxx
src/db/plugins/ProxyDatabasePlugin.cxx
+2
-1
SimpleDatabasePlugin.cxx
src/db/plugins/simple/SimpleDatabasePlugin.cxx
+3
-3
UpnpDatabasePlugin.cxx
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
+1
-1
InotifySource.cxx
src/db/update/InotifySource.cxx
+1
-1
InotifyUpdate.cxx
src/db/update/InotifyUpdate.cxx
+1
-1
Walk.hxx
src/db/update/Walk.hxx
+4
-4
FlacDecoderPlugin.cxx
src/decoder/plugins/FlacDecoderPlugin.cxx
+2
-2
FlacInput.cxx
src/decoder/plugins/FlacInput.cxx
+6
-6
FluidsynthDecoderPlugin.cxx
src/decoder/plugins/FluidsynthDecoderPlugin.cxx
+1
-1
GmeDecoderPlugin.cxx
src/decoder/plugins/GmeDecoderPlugin.cxx
+1
-1
Mpg123DecoderPlugin.cxx
src/decoder/plugins/Mpg123DecoderPlugin.cxx
+1
-1
OpusDecoderPlugin.cxx
src/decoder/plugins/OpusDecoderPlugin.cxx
+1
-1
SndfileDecoderPlugin.cxx
src/decoder/plugins/SndfileDecoderPlugin.cxx
+4
-4
VorbisDecoderPlugin.cxx
src/decoder/plugins/VorbisDecoderPlugin.cxx
+1
-1
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+1
-1
EncoderInterface.hxx
src/encoder/EncoderInterface.hxx
+1
-1
FlacEncoderPlugin.cxx
src/encoder/plugins/FlacEncoderPlugin.cxx
+2
-2
NullEncoderPlugin.cxx
src/encoder/plugins/NullEncoderPlugin.cxx
+1
-1
WaveEncoderPlugin.cxx
src/encoder/plugins/WaveEncoderPlugin.cxx
+1
-1
Loop.cxx
src/event/Loop.cxx
+1
-1
PollGroupEpoll.hxx
src/event/PollGroupEpoll.hxx
+1
-1
ServerSocket.cxx
src/event/ServerSocket.cxx
+1
-1
Observer.cxx
src/filter/Observer.cxx
+1
-1
NormalizeFilterPlugin.cxx
src/filter/plugins/NormalizeFilterPlugin.cxx
+1
-1
NullFilterPlugin.cxx
src/filter/plugins/NullFilterPlugin.cxx
+1
-1
FileOutputStream.cxx
src/fs/io/FileOutputStream.cxx
+1
-1
IcyInputStream.hxx
src/input/IcyInputStream.hxx
+1
-1
InputStream.cxx
src/input/InputStream.cxx
+1
-1
ProxyInputStream.hxx
src/input/ProxyInputStream.hxx
+1
-1
AlsaInputPlugin.cxx
src/input/plugins/AlsaInputPlugin.cxx
+2
-2
Global.cxx
src/lib/curl/Global.cxx
+2
-2
AppendIter.hxx
src/lib/dbus/AppendIter.hxx
+1
-1
Error.hxx
src/lib/dbus/Error.hxx
+1
-1
LogCallback.cxx
src/lib/ffmpeg/LogCallback.cxx
+1
-1
Connection.cxx
src/lib/nfs/Connection.cxx
+3
-3
Init.cxx
src/lib/smbclient/Init.cxx
+5
-5
Util.hxx
src/lib/sqlite/Util.hxx
+1
-1
Action.hxx
src/lib/upnp/Action.hxx
+1
-1
FlacIOHandle.cxx
src/lib/xiph/FlacIOHandle.cxx
+1
-1
AlsaMixerPlugin.cxx
src/mixer/plugins/AlsaMixerPlugin.cxx
+1
-1
HaikuMixerPlugin.cxx
src/mixer/plugins/HaikuMixerPlugin.cxx
+2
-2
NullMixerPlugin.cxx
src/mixer/plugins/NullMixerPlugin.cxx
+3
-3
OSXMixerPlugin.cxx
src/mixer/plugins/OSXMixerPlugin.cxx
+2
-2
OssMixerPlugin.cxx
src/mixer/plugins/OssMixerPlugin.cxx
+2
-2
PulseMixerPlugin.cxx
src/mixer/plugins/PulseMixerPlugin.cxx
+3
-3
SndioMixerPlugin.cxx
src/mixer/plugins/SndioMixerPlugin.cxx
+2
-2
SoftwareMixerPlugin.cxx
src/mixer/plugins/SoftwareMixerPlugin.cxx
+3
-3
WinmmMixerPlugin.cxx
src/mixer/plugins/WinmmMixerPlugin.cxx
+2
-2
SmbclientNeighborPlugin.cxx
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
+2
-2
UdisksNeighborPlugin.cxx
src/neighbor/plugins/UdisksNeighborPlugin.cxx
+1
-1
UpnpNeighborPlugin.cxx
src/neighbor/plugins/UpnpNeighborPlugin.cxx
+1
-1
Interface.cxx
src/output/Interface.cxx
+2
-2
SharedPipeConsumer.hxx
src/output/SharedPipeConsumer.hxx
+2
-2
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+1
-1
HaikuOutputPlugin.cxx
src/output/plugins/HaikuOutputPlugin.cxx
+3
-3
NullOutputPlugin.cxx
src/output/plugins/NullOutputPlugin.cxx
+1
-1
OSXOutputPlugin.cxx
src/output/plugins/OSXOutputPlugin.cxx
+3
-3
PipeOutputPlugin.cxx
src/output/plugins/PipeOutputPlugin.cxx
+1
-1
PulseOutputPlugin.cxx
src/output/plugins/PulseOutputPlugin.cxx
+6
-6
HttpdOutputPlugin.cxx
src/output/plugins/httpd/HttpdOutputPlugin.cxx
+1
-1
SlesOutputPlugin.cxx
src/output/plugins/sles/SlesOutputPlugin.cxx
+1
-1
Thread.cxx
src/player/Thread.cxx
+3
-1
EmbeddedCuePlaylistPlugin.cxx
src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx
+1
-1
XspfPlaylistPlugin.cxx
src/playlist/plugins/XspfPlaylistPlugin.cxx
+1
-1
CompositeStorage.hxx
src/storage/CompositeStorage.hxx
+1
-1
MemoryDirectoryReader.cxx
src/storage/MemoryDirectoryReader.cxx
+1
-1
StorageInterface.cxx
src/storage/StorageInterface.cxx
+1
-1
CurlStorage.cxx
src/storage/plugins/CurlStorage.cxx
+2
-2
NfsStorage.cxx
src/storage/plugins/NfsStorage.cxx
+2
-2
SmbclientStorage.cxx
src/storage/plugins/SmbclientStorage.cxx
+3
-3
EventFD.cxx
src/system/EventFD.cxx
+1
-1
EventPipe.cxx
src/system/EventPipe.cxx
+1
-1
FatalError.cxx
src/system/FatalError.cxx
+1
-1
FatalError.hxx
src/system/FatalError.hxx
+5
-5
Handler.cxx
src/tag/Handler.cxx
+1
-1
Handler.hxx
src/tag/Handler.hxx
+1
-1
Mutex.hxx
src/thread/Mutex.hxx
+1
-1
Name.hxx
src/thread/Name.hxx
+1
-1
Daemon.hxx
src/unix/Daemon.hxx
+2
-0
Alloc.cxx
src/util/Alloc.cxx
+1
-1
Compiler.h
src/util/Compiler.h
+0
-14
Exception.hxx
src/util/Exception.hxx
+2
-2
UTF8.cxx
src/util/UTF8.cxx
+1
-1
Win32Main.cxx
src/win32/Win32Main.cxx
+3
-3
ZeroconfAvahi.cxx
src/zeroconf/ZeroconfAvahi.cxx
+2
-2
ZeroconfBonjour.cxx
src/zeroconf/ZeroconfBonjour.cxx
+6
-6
ZeroconfGlue.cxx
src/zeroconf/ZeroconfGlue.cxx
+1
-1
DumpDecoderClient.cxx
test/DumpDecoderClient.cxx
+6
-6
MakeTag.hxx
test/MakeTag.hxx
+1
-1
ReadApeTags.cxx
test/ReadApeTags.cxx
+1
-1
read_mixer.cxx
test/read_mixer.cxx
+2
-2
run_avahi.cxx
test/run_avahi.cxx
+1
-1
run_convert.cxx
test/run_convert.cxx
+2
-2
run_filter.cxx
test/run_filter.cxx
+2
-2
run_gunzip.cxx
test/run_gunzip.cxx
+1
-1
run_gzip.cxx
test/run_gzip.cxx
+1
-1
run_inotify.cxx
test/run_inotify.cxx
+2
-2
run_normalize.cxx
test/run_normalize.cxx
+1
-1
software_volume.cxx
test/software_volume.cxx
+1
-1
test_translate_song.cxx
test/test_translate_song.cxx
+3
-3
test_vorbis_encoder.cxx
test/test_vorbis_encoder.cxx
+1
-1
No files found.
src/Chrono.hxx
View file @
256cfc54
...
...
@@ -95,7 +95,7 @@ public:
constexpr
double
ToDoubleS
()
const
{
return
double
(
count
())
/
1000.
;
}
;
}
constexpr
bool
IsZero
()
const
{
return
count
()
==
0
;
...
...
@@ -199,7 +199,7 @@ public:
constexpr
double
ToDoubleS
()
const
{
return
double
(
count
())
/
1000.
;
}
;
}
constexpr
bool
IsZero
()
const
{
return
count
()
==
0
;
...
...
src/CommandLine.cxx
View file @
256cfc54
...
...
@@ -106,7 +106,7 @@ static constexpr OptionDef option_defs[] = {
static
constexpr
Domain
cmdline_domain
(
"cmdline"
);
gcc_noreturn
[[
noreturn
]]
static
void
version
()
{
printf
(
"Music Player Daemon "
VERSION
" (%s)"
...
...
@@ -272,7 +272,7 @@ static void PrintOption(const OptionDef &opt)
opt
.
GetDescription
());
}
gcc_noreturn
[[
noreturn
]]
static
void
help
()
{
printf
(
"Usage:
\n
"
...
...
src/Instance.cxx
View file @
256cfc54
...
...
@@ -150,13 +150,13 @@ Instance::OnDatabaseSongRemoved(const char *uri) noexcept
#ifdef ENABLE_NEIGHBOR_PLUGINS
void
Instance
::
FoundNeighbor
(
gcc_unused
const
NeighborInfo
&
info
)
noexcept
Instance
::
FoundNeighbor
(
[[
maybe_unused
]]
const
NeighborInfo
&
info
)
noexcept
{
EmitIdle
(
IDLE_NEIGHBOR
);
}
void
Instance
::
LostNeighbor
(
gcc_unused
const
NeighborInfo
&
info
)
noexcept
Instance
::
LostNeighbor
(
[[
maybe_unused
]]
const
NeighborInfo
&
info
)
noexcept
{
EmitIdle
(
IDLE_NEIGHBOR
);
}
...
...
src/LogInit.cxx
View file @
256cfc54
...
...
@@ -46,7 +46,7 @@
#define LOG_DATE_BUF_SIZE 16
#define LOG_DATE_LEN (LOG_DATE_BUF_SIZE - 1)
gcc_unused
[[
maybe_unused
]]
static
constexpr
Domain
log_domain
(
"log"
);
#ifndef ANDROID
...
...
src/command/AllCommands.cxx
View file @
256cfc54
...
...
@@ -216,8 +216,8 @@ static constexpr unsigned num_commands = std::size(commands);
gcc_pure
static
bool
command_available
(
gcc_unused
const
Partition
&
partition
,
gcc_unused
const
struct
command
*
cmd
)
noexcept
command_available
(
[[
maybe_unused
]]
const
Partition
&
partition
,
[[
maybe_unused
]]
const
struct
command
*
cmd
)
noexcept
{
#ifdef ENABLE_SQLITE
if
(
StringIsEqual
(
cmd
->
cmd
,
"sticker"
))
...
...
@@ -272,14 +272,14 @@ PrintUnavailableCommands(Response &r, unsigned permission) noexcept
/* don't be fooled, this is the command handler for "commands" command */
static
CommandResult
handle_commands
(
Client
&
client
,
gcc_unused
Request
request
,
Response
&
r
)
handle_commands
(
Client
&
client
,
[[
maybe_unused
]]
Request
request
,
Response
&
r
)
{
return
PrintAvailableCommands
(
r
,
client
.
GetPartition
(),
client
.
GetPermission
());
}
static
CommandResult
handle_not_commands
(
Client
&
client
,
gcc_unused
Request
request
,
Response
&
r
)
handle_not_commands
(
Client
&
client
,
[[
maybe_unused
]]
Request
request
,
Response
&
r
)
{
return
PrintUnavailableCommands
(
r
,
client
.
GetPermission
());
}
...
...
src/command/ClientCommands.cxx
View file @
256cfc54
...
...
@@ -27,15 +27,15 @@
#include "util/StringAPI.hxx"
CommandResult
handle_close
(
gcc_unused
Client
&
client
,
gcc_unused
Request
args
,
gcc_unused
Response
&
r
)
handle_close
(
[[
maybe_unused
]]
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
return
CommandResult
::
FINISH
;
}
CommandResult
handle_ping
(
gcc_unused
Client
&
client
,
gcc_unused
Request
args
,
gcc_unused
Response
&
r
)
handle_ping
(
[[
maybe_unused
]]
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
return
CommandResult
::
OK
;
}
...
...
src/command/MessageCommands.cxx
View file @
256cfc54
...
...
@@ -72,7 +72,7 @@ handle_unsubscribe(Client &client, Request args, Response &r)
}
CommandResult
handle_channels
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_channels
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
assert
(
args
.
empty
());
...
...
@@ -92,7 +92,7 @@ handle_channels(Client &client, gcc_unused Request args, Response &r)
CommandResult
handle_read_messages
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
assert
(
args
.
empty
());
...
...
src/command/NeighborCommands.cxx
View file @
256cfc54
...
...
@@ -34,7 +34,7 @@ neighbor_commands_available(const Instance &instance) noexcept
}
CommandResult
handle_listneighbors
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_listneighbors
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
const
NeighborGlue
*
const
neighbors
=
client
.
GetInstance
().
neighbors
.
get
();
...
...
src/command/OtherCommands.cxx
View file @
256cfc54
...
...
@@ -69,7 +69,7 @@ print_spl_list(Response &r, const PlaylistVector &list)
}
CommandResult
handle_urlhandlers
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_urlhandlers
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
if
(
client
.
IsLocal
())
r
.
Format
(
"handler: file://
\n
"
);
...
...
@@ -78,7 +78,7 @@ handle_urlhandlers(Client &client, gcc_unused Request args, Response &r)
}
CommandResult
handle_decoders
(
gcc_unused
Client
&
client
,
gcc_unused
Request
args
,
handle_decoders
(
[[
maybe_unused
]]
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
decoder_list_print
(
r
);
...
...
@@ -86,8 +86,8 @@ handle_decoders(gcc_unused Client &client, gcc_unused Request args,
}
CommandResult
handle_kill
(
gcc_unused
Client
&
client
,
gcc_unused
Request
request
,
gcc_unused
Response
&
r
)
handle_kill
(
[[
maybe_unused
]]
Client
&
client
,
[[
maybe_unused
]]
Request
request
,
[[
maybe_unused
]]
Response
&
r
)
{
return
CommandResult
::
KILL
;
}
...
...
@@ -307,7 +307,7 @@ handle_update(Client &client, Request args, Response &r, bool discard)
}
CommandResult
handle_update
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_update
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
return
handle_update
(
client
,
args
,
r
,
false
);
}
...
...
@@ -360,14 +360,14 @@ handle_volume(Client &client, Request args, Response &r)
}
CommandResult
handle_stats
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_stats
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
stats_print
(
r
,
client
.
GetPartition
());
return
CommandResult
::
OK
;
}
CommandResult
handle_config
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_config
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
if
(
!
client
.
IsLocal
())
{
r
.
Error
(
ACK_ERROR_PERMISSION
,
...
...
src/command/OutputCommands.cxx
View file @
256cfc54
...
...
@@ -118,7 +118,7 @@ handle_outputset(Client &client, Request request, Response &response)
}
CommandResult
handle_devices
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_devices
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
assert
(
args
.
empty
());
...
...
src/command/PlayerCommands.cxx
View file @
256cfc54
...
...
@@ -60,7 +60,7 @@
#define COMMAND_STATUS_UPDATING_DB "updating_db"
CommandResult
handle_play
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_play
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
int
song
=
args
.
ParseOptional
(
0
,
-
1
);
...
...
@@ -69,7 +69,7 @@ handle_play(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_playid
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_playid
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
int
id
=
args
.
ParseOptional
(
0
,
-
1
);
...
...
@@ -78,21 +78,21 @@ handle_playid(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_stop
(
Client
&
client
,
gcc_unused
Request
args
,
gcc_unused
Response
&
r
)
handle_stop
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
client
.
GetPartition
().
Stop
();
return
CommandResult
::
OK
;
}
CommandResult
handle_currentsong
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_currentsong
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
playlist_print_current
(
r
,
client
.
GetPlaylist
());
return
CommandResult
::
OK
;
}
CommandResult
handle_pause
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_pause
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
auto
&
pc
=
client
.
GetPlayerControl
();
...
...
@@ -106,7 +106,7 @@ handle_pause(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_status
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_status
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
auto
&
partition
=
client
.
GetPartition
();
auto
&
pc
=
partition
.
pc
;
...
...
@@ -216,7 +216,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r)
}
CommandResult
handle_next
(
Client
&
client
,
gcc_unused
Request
args
,
gcc_unused
Response
&
r
)
handle_next
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
playlist
&
playlist
=
client
.
GetPlaylist
();
...
...
@@ -234,15 +234,15 @@ handle_next(Client &client, gcc_unused Request args, gcc_unused Response &r)
}
CommandResult
handle_previous
(
Client
&
client
,
gcc_unused
Request
args
,
gcc_unused
Response
&
r
)
handle_previous
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
client
.
GetPartition
().
PlayPrevious
();
return
CommandResult
::
OK
;
}
CommandResult
handle_repeat
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_repeat
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
bool
status
=
args
.
ParseBool
(
0
);
client
.
GetPartition
().
SetRepeat
(
status
);
...
...
@@ -250,7 +250,7 @@ handle_repeat(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_single
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_single
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
auto
new_mode
=
SingleFromString
(
args
.
front
());
client
.
GetPartition
().
SetSingle
(
new_mode
);
...
...
@@ -258,7 +258,7 @@ handle_single(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_consume
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_consume
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
bool
status
=
args
.
ParseBool
(
0
);
client
.
GetPartition
().
SetConsume
(
status
);
...
...
@@ -266,7 +266,7 @@ handle_consume(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_random
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_random
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
bool
status
=
args
.
ParseBool
(
0
);
auto
&
partition
=
client
.
GetPartition
();
...
...
@@ -276,15 +276,15 @@ handle_random(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_clearerror
(
Client
&
client
,
gcc_unused
Request
args
,
gcc_unused
Response
&
r
)
handle_clearerror
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
client
.
GetPlayerControl
().
LockClearError
();
return
CommandResult
::
OK
;
}
CommandResult
handle_seek
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_seek
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
unsigned
song
=
args
.
ParseUnsigned
(
0
);
SongTime
seek_time
=
args
.
ParseSongTime
(
1
);
...
...
@@ -294,7 +294,7 @@ handle_seek(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_seekid
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_seekid
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
unsigned
id
=
args
.
ParseUnsigned
(
0
);
SongTime
seek_time
=
args
.
ParseSongTime
(
1
);
...
...
@@ -304,7 +304,7 @@ handle_seekid(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_seekcur
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_seekcur
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
const
char
*
p
=
args
.
front
();
bool
relative
=
*
p
==
'+'
||
*
p
==
'-'
;
...
...
@@ -315,7 +315,7 @@ handle_seekcur(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_crossfade
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_crossfade
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
FloatDuration
duration
{
args
.
ParseUnsigned
(
0
)};
client
.
GetPlayerControl
().
SetCrossFade
(
duration
);
...
...
@@ -323,7 +323,7 @@ handle_crossfade(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_mixrampdb
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_mixrampdb
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
float
db
=
args
.
ParseFloat
(
0
);
client
.
GetPlayerControl
().
SetMixRampDb
(
db
);
...
...
@@ -331,7 +331,7 @@ handle_mixrampdb(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_mixrampdelay
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_mixrampdelay
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
FloatDuration
delay_secs
{
args
.
ParseFloat
(
0
)};
client
.
GetPlayerControl
().
SetMixRampDelay
(
delay_secs
);
...
...
@@ -349,7 +349,7 @@ handle_replay_gain_mode(Client &client, Request args, Response &)
}
CommandResult
handle_replay_gain_status
(
Client
&
client
,
gcc_unused
Request
args
,
handle_replay_gain_status
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
r
.
Format
(
"replay_gain_mode: %s
\n
"
,
...
...
src/command/PlaylistCommands.cxx
View file @
256cfc54
...
...
@@ -60,14 +60,14 @@ print_spl_list(Response &r, const PlaylistVector &list)
}
CommandResult
handle_save
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_save
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
spl_save_playlist
(
args
.
front
(),
client
.
GetPlaylist
());
return
CommandResult
::
OK
;
}
CommandResult
handle_load
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_load
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
const
auto
uri
=
LocateUri
(
UriPluginKind
::
PLAYLIST
,
args
.
front
(),
&
client
...
...
@@ -132,7 +132,7 @@ handle_listplaylistinfo(Client &client, Request args, Response &r)
}
CommandResult
handle_rm
(
gcc_unused
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_rm
(
[[
maybe_unused
]]
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
const
char
*
const
name
=
args
.
front
();
...
...
@@ -141,7 +141,7 @@ handle_rm(gcc_unused Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_rename
(
gcc_unused
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_rename
(
[[
maybe_unused
]]
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
const
char
*
const
old_name
=
args
[
0
];
const
char
*
const
new_name
=
args
[
1
];
...
...
@@ -151,8 +151,8 @@ handle_rename(gcc_unused Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_playlistdelete
(
gcc_unused
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_playlistdelete
(
[[
maybe_unused
]]
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
const
char
*
const
name
=
args
[
0
];
unsigned
from
=
args
.
ParseUnsigned
(
1
);
...
...
@@ -162,8 +162,8 @@ handle_playlistdelete(gcc_unused Client &client,
}
CommandResult
handle_playlistmove
(
gcc_unused
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_playlistmove
(
[[
maybe_unused
]]
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
const
char
*
const
name
=
args
.
front
();
unsigned
from
=
args
.
ParseUnsigned
(
1
);
...
...
@@ -174,8 +174,8 @@ handle_playlistmove(gcc_unused Client &client,
}
CommandResult
handle_playlistclear
(
gcc_unused
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_playlistclear
(
[[
maybe_unused
]]
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
const
char
*
const
name
=
args
.
front
();
...
...
@@ -184,7 +184,7 @@ handle_playlistclear(gcc_unused Client &client,
}
CommandResult
handle_playlistadd
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_playlistadd
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
const
char
*
const
playlist
=
args
[
0
];
const
char
*
const
uri
=
args
[
1
];
...
...
@@ -209,7 +209,7 @@ handle_playlistadd(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_listplaylists
(
gcc_unused
Client
&
client
,
gcc_unused
Request
args
,
handle_listplaylists
(
[[
maybe_unused
]]
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
print_spl_list
(
r
,
ListPlaylistFiles
());
...
...
src/command/QueueCommands.cxx
View file @
256cfc54
...
...
@@ -51,7 +51,7 @@ AddUri(Client &client, const LocatedUri &uri)
static
CommandResult
AddDatabaseSelection
(
Client
&
client
,
const
char
*
uri
,
gcc_unused
Response
&
r
)
[[
maybe_unused
]]
Response
&
r
)
{
#ifdef ENABLE_DATABASE
auto
&
partition
=
client
.
GetPartition
();
...
...
@@ -179,7 +179,7 @@ handle_rangeid(Client &client, Request args, Response &r)
}
CommandResult
handle_delete
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_delete
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
RangeArg
range
=
args
.
ParseRange
(
0
);
client
.
GetPartition
().
DeleteRange
(
range
.
start
,
range
.
end
);
...
...
@@ -187,7 +187,7 @@ handle_delete(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_deleteid
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_deleteid
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
unsigned
id
=
args
.
ParseUnsigned
(
0
);
client
.
GetPartition
().
DeleteId
(
id
);
...
...
@@ -195,14 +195,14 @@ handle_deleteid(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_playlist
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_playlist
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
playlist_print_uris
(
r
,
client
.
GetPlaylist
());
return
CommandResult
::
OK
;
}
CommandResult
handle_shuffle
(
gcc_unused
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_shuffle
(
[[
maybe_unused
]]
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
RangeArg
range
=
args
.
ParseOptional
(
0
,
RangeArg
::
All
());
client
.
GetPartition
().
Shuffle
(
range
.
start
,
range
.
end
);
...
...
@@ -210,7 +210,7 @@ handle_shuffle(gcc_unused Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_clear
(
Client
&
client
,
gcc_unused
Request
args
,
gcc_unused
Response
&
r
)
handle_clear
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
client
.
GetPartition
().
ClearQueue
();
return
CommandResult
::
OK
;
...
...
@@ -291,7 +291,7 @@ handle_playlistsearch(Client &client, Request args, Response &r)
}
CommandResult
handle_prio
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_prio
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
unsigned
priority
=
args
.
ParseUnsigned
(
0
,
0xff
);
args
.
shift
();
...
...
@@ -307,7 +307,7 @@ handle_prio(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_prioid
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_prioid
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
unsigned
priority
=
args
.
ParseUnsigned
(
0
,
0xff
);
args
.
shift
();
...
...
@@ -323,7 +323,7 @@ handle_prioid(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_move
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_move
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
RangeArg
range
=
args
.
ParseRange
(
0
);
int
to
=
args
.
ParseInt
(
1
);
...
...
@@ -332,7 +332,7 @@ handle_move(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_moveid
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_moveid
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
unsigned
id
=
args
.
ParseUnsigned
(
0
);
int
to
=
args
.
ParseInt
(
1
);
...
...
@@ -341,7 +341,7 @@ handle_moveid(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_swap
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_swap
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
unsigned
song1
=
args
.
ParseUnsigned
(
0
);
unsigned
song2
=
args
.
ParseUnsigned
(
1
);
...
...
@@ -350,7 +350,7 @@ handle_swap(Client &client, Request args, gcc_unused Response &r)
}
CommandResult
handle_swapid
(
Client
&
client
,
Request
args
,
gcc_unused
Response
&
r
)
handle_swapid
(
Client
&
client
,
Request
args
,
[[
maybe_unused
]]
Response
&
r
)
{
unsigned
id1
=
args
.
ParseUnsigned
(
0
);
unsigned
id2
=
args
.
ParseUnsigned
(
1
);
...
...
src/command/StorageCommands.cxx
View file @
256cfc54
...
...
@@ -143,7 +143,7 @@ print_storage_uri(Client &client, Response &r, const Storage &storage)
}
CommandResult
handle_listmounts
(
Client
&
client
,
gcc_unused
Request
args
,
Response
&
r
)
handle_listmounts
(
Client
&
client
,
[[
maybe_unused
]]
Request
args
,
Response
&
r
)
{
Storage
*
_composite
=
client
.
GetInstance
().
storage
;
if
(
_composite
==
nullptr
)
{
...
...
src/db/Interface.hxx
View file @
256cfc54
...
...
@@ -126,8 +126,8 @@ public:
*
* @return the job id or 0 if not implemented
*/
virtual
unsigned
Update
(
gcc_unused
const
char
*
uri_utf8
,
gcc_unused
bool
discard
)
{
virtual
unsigned
Update
(
[[
maybe_unused
]]
const
char
*
uri_utf8
,
[[
maybe_unused
]]
bool
discard
)
{
/* not implemented: return 0 */
return
0
;
}
...
...
src/db/plugins/ProxyDatabasePlugin.cxx
View file @
256cfc54
...
...
@@ -277,6 +277,7 @@ Convert(TagType tag_type) noexcept
return
MPD_TAG_COUNT
;
}
[[
noreturn
]]
static
void
ThrowError
(
struct
mpd_connection
*
connection
)
{
...
...
@@ -574,7 +575,7 @@ ProxyDatabase::Disconnect() noexcept
}
bool
ProxyDatabase
::
OnSocketReady
(
gcc_unused
unsigned
flags
)
noexcept
ProxyDatabase
::
OnSocketReady
(
[[
maybe_unused
]]
unsigned
flags
)
noexcept
{
assert
(
connection
!=
nullptr
);
...
...
src/db/plugins/simple/SimpleDatabasePlugin.cxx
View file @
256cfc54
...
...
@@ -70,7 +70,7 @@ inline SimpleDatabase::SimpleDatabase(const ConfigBlock &block)
inline
SimpleDatabase
::
SimpleDatabase
(
AllocatedPath
&&
_path
,
#ifndef ENABLE_ZLIB
gcc_unused
[[
maybe_unused
]]
#endif
bool
_compress
)
noexcept
:
Database
(
simple_db_plugin
),
...
...
@@ -85,7 +85,7 @@ inline SimpleDatabase::SimpleDatabase(AllocatedPath &&_path,
DatabasePtr
SimpleDatabase
::
Create
(
EventLoop
&
,
EventLoop
&
,
gcc_unused
DatabaseListener
&
listener
,
[[
maybe_unused
]]
DatabaseListener
&
listener
,
const
ConfigBlock
&
block
)
{
return
std
::
make_unique
<
SimpleDatabase
>
(
block
);
...
...
@@ -248,7 +248,7 @@ SimpleDatabase::GetSong(const char *uri) const
}
void
SimpleDatabase
::
ReturnSong
(
gcc_unused
const
LightSong
*
song
)
const
noexcept
SimpleDatabase
::
ReturnSong
(
[[
maybe_unused
]]
const
LightSong
*
song
)
const
noexcept
{
assert
(
song
!=
nullptr
);
assert
(
song
==
prefixed_light_song
||
song
==
&
light_song
.
Get
());
...
...
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
View file @
256cfc54
...
...
@@ -145,7 +145,7 @@ private:
DatabasePtr
UpnpDatabase
::
Create
(
EventLoop
&
,
EventLoop
&
io_event_loop
,
gcc_unused
DatabaseListener
&
listener
,
[[
maybe_unused
]]
DatabaseListener
&
listener
,
const
ConfigBlock
&
)
noexcept
{
return
std
::
make_unique
<
UpnpDatabase
>
(
io_event_loop
);
...
...
src/db/update/InotifySource.cxx
View file @
256cfc54
...
...
@@ -31,7 +31,7 @@
#include <sys/inotify.h>
bool
InotifySource
::
OnSocketReady
(
gcc_unused
unsigned
flags
)
noexcept
InotifySource
::
OnSocketReady
(
[[
maybe_unused
]]
unsigned
flags
)
noexcept
{
uint8_t
buffer
[
4096
];
static_assert
(
sizeof
(
buffer
)
>=
sizeof
(
struct
inotify_event
)
+
NAME_MAX
+
1
,
...
...
src/db/update/InotifyUpdate.cxx
View file @
256cfc54
...
...
@@ -236,7 +236,7 @@ WatchDirectory::GetDepth() const noexcept
static
void
mpd_inotify_callback
(
int
wd
,
unsigned
mask
,
gcc_unused
const
char
*
name
,
gcc_unused
void
*
ctx
)
[[
maybe_unused
]]
const
char
*
name
,
[[
maybe_unused
]]
void
*
ctx
)
{
WatchDirectory
*
directory
;
...
...
src/db/update/Walk.hxx
View file @
256cfc54
...
...
@@ -111,10 +111,10 @@ private:
#else
bool
UpdateArchiveFile
(
gcc_unused
Directory
&
directory
,
gcc_unused
const
char
*
name
,
gcc_unused
const
char
*
suffix
,
gcc_unused
const
StorageFileInfo
&
info
)
noexcept
{
bool
UpdateArchiveFile
(
[[
maybe_unused
]]
Directory
&
directory
,
[[
maybe_unused
]]
const
char
*
name
,
[[
maybe_unused
]]
const
char
*
suffix
,
[[
maybe_unused
]]
const
StorageFileInfo
&
info
)
noexcept
{
return
false
;
}
#endif
...
...
src/decoder/plugins/FlacDecoderPlugin.cxx
View file @
256cfc54
...
...
@@ -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
;
}
...
...
src/decoder/plugins/FlacInput.cxx
View file @
256cfc54
...
...
@@ -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
;
...
...
src/decoder/plugins/FluidsynthDecoderPlugin.cxx
View file @
256cfc54
...
...
@@ -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
());
}
...
...
src/decoder/plugins/GmeDecoderPlugin.cxx
View file @
256cfc54
...
...
@@ -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"
);
...
...
src/decoder/plugins/Mpg123DecoderPlugin.cxx
View file @
256cfc54
...
...
@@ -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
();
...
...
src/decoder/plugins/OpusDecoderPlugin.cxx
View file @
256cfc54
...
...
@@ -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
());
...
...
src/decoder/plugins/SndfileDecoderPlugin.cxx
View file @
256cfc54
...
...
@@ -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
;
...
...
src/decoder/plugins/VorbisDecoderPlugin.cxx
View file @
256cfc54
...
...
@@ -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
());
...
...
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
256cfc54
...
...
@@ -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 */
}
...
...
src/encoder/EncoderInterface.hxx
View file @
256cfc54
...
...
@@ -84,7 +84,7 @@ public:
*
* @param tag the tag object
*/
virtual
void
SendTag
(
gcc_unused
const
Tag
&
tag
)
{
virtual
void
SendTag
(
[[
maybe_unused
]]
const
Tag
&
tag
)
{
}
/**
...
...
src/encoder/plugins/FlacEncoderPlugin.cxx
View file @
256cfc54
...
...
@@ -69,8 +69,8 @@ private:
static
FLAC__StreamEncoderWriteStatus
WriteCallback
(
const
FLAC__StreamEncoder
*
,
const
FLAC__byte
data
[],
size_t
bytes
,
gcc_unused
unsigned
samples
,
gcc_unused
unsigned
current_frame
,
[[
maybe_unused
]]
unsigned
samples
,
[[
maybe_unused
]]
unsigned
current_frame
,
void
*
client_data
)
noexcept
{
auto
&
encoder
=
*
(
FlacEncoder
*
)
client_data
;
encoder
.
output_buffer
.
Append
((
const
uint8_t
*
)
data
,
bytes
);
...
...
src/encoder/plugins/NullEncoderPlugin.cxx
View file @
256cfc54
...
...
@@ -49,7 +49,7 @@ public:
};
static
PreparedEncoder
*
null_encoder_init
(
gcc_unused
const
ConfigBlock
&
block
)
null_encoder_init
(
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
new
PreparedNullEncoder
();
}
...
...
src/encoder/plugins/WaveEncoderPlugin.cxx
View file @
256cfc54
...
...
@@ -98,7 +98,7 @@ fill_wave_header(WaveHeader *header, int channels, int bits,
}
static
PreparedEncoder
*
wave_encoder_init
(
gcc_unused
const
ConfigBlock
&
block
)
wave_encoder_init
(
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
new
PreparedWaveEncoder
();
}
...
...
src/event/Loop.cxx
View file @
256cfc54
...
...
@@ -271,7 +271,7 @@ EventLoop::HandleDeferred() noexcept
}
bool
EventLoop
::
OnSocketReady
(
gcc_unused
unsigned
flags
)
noexcept
EventLoop
::
OnSocketReady
(
[[
maybe_unused
]]
unsigned
flags
)
noexcept
{
assert
(
IsInside
());
...
...
src/event/PollGroupEpoll.hxx
View file @
256cfc54
...
...
@@ -89,7 +89,7 @@ public:
return
epoll
.
Remove
(
fd
);
}
bool
Abandon
(
gcc_unused
int
fd
)
noexcept
{
bool
Abandon
(
[[
maybe_unused
]]
int
fd
)
noexcept
{
// Nothing to do in this implementation.
// Closed descriptors are automatically unregistered.
return
true
;
...
...
src/event/ServerSocket.cxx
View file @
256cfc54
...
...
@@ -161,7 +161,7 @@ ServerSocket::OneServerSocket::Accept() noexcept
}
bool
ServerSocket
::
OneServerSocket
::
OnSocketReady
(
gcc_unused
unsigned
flags
)
noexcept
ServerSocket
::
OneServerSocket
::
OnSocketReady
(
[[
maybe_unused
]]
unsigned
flags
)
noexcept
{
Accept
();
return
true
;
...
...
src/filter/Observer.cxx
View file @
256cfc54
...
...
@@ -43,7 +43,7 @@ public:
observer
.
proxy
=
nullptr
;
}
void
Clear
(
gcc_unused
Proxy
*
_child
)
noexcept
{
void
Clear
(
[[
maybe_unused
]]
Proxy
*
_child
)
noexcept
{
assert
(
child
==
_child
);
child
=
nullptr
;
}
...
...
src/filter/plugins/NormalizeFilterPlugin.cxx
View file @
256cfc54
...
...
@@ -53,7 +53,7 @@ public:
};
static
std
::
unique_ptr
<
PreparedFilter
>
normalize_filter_init
(
gcc_unused
const
ConfigBlock
&
block
)
normalize_filter_init
(
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
std
::
make_unique
<
PreparedNormalizeFilter
>
();
}
...
...
src/filter/plugins/NullFilterPlugin.cxx
View file @
256cfc54
...
...
@@ -38,7 +38,7 @@ public:
};
static
std
::
unique_ptr
<
PreparedFilter
>
null_filter_init
(
gcc_unused
const
ConfigBlock
&
block
)
null_filter_init
(
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
std
::
make_unique
<
PreparedNullFilter
>
();
}
...
...
src/fs/io/FileOutputStream.cxx
View file @
256cfc54
...
...
@@ -81,7 +81,7 @@ FileOutputStream::Open()
#ifdef _WIN32
inline
void
FileOutputStream
::
OpenCreate
(
gcc_unused
bool
visible
)
FileOutputStream
::
OpenCreate
(
[[
maybe_unused
]]
bool
visible
)
{
handle
=
CreateFile
(
path
.
c_str
(),
GENERIC_WRITE
,
0
,
nullptr
,
CREATE_ALWAYS
,
...
...
src/input/IcyInputStream.hxx
View file @
256cfc54
...
...
@@ -58,7 +58,7 @@ public:
*/
IcyInputStream
(
InputStreamPtr
_input
,
std
::
shared_ptr
<
IcyMetaDataParser
>
_parser
);
virtual
~
IcyInputStream
()
noexcept
;
~
IcyInputStream
()
noexcept
override
;
IcyInputStream
(
const
IcyInputStream
&
)
=
delete
;
IcyInputStream
&
operator
=
(
const
IcyInputStream
&
)
=
delete
;
...
...
src/input/InputStream.cxx
View file @
256cfc54
...
...
@@ -69,7 +69,7 @@ InputStream::CheapSeeking() const noexcept
}
void
InputStream
::
Seek
(
std
::
unique_lock
<
Mutex
>
&
,
gcc_unused
offset_type
new_offset
)
InputStream
::
Seek
(
std
::
unique_lock
<
Mutex
>
&
,
[[
maybe_unused
]]
offset_type
new_offset
)
{
throw
std
::
runtime_error
(
"Seeking is not implemented"
);
}
...
...
src/input/ProxyInputStream.hxx
View file @
256cfc54
...
...
@@ -52,7 +52,7 @@ public:
Mutex
&
_mutex
)
noexcept
:
InputStream
(
_uri
,
_mutex
)
{}
virtual
~
ProxyInputStream
()
noexcept
;
~
ProxyInputStream
()
noexcept
override
;
ProxyInputStream
(
const
ProxyInputStream
&
)
=
delete
;
ProxyInputStream
&
operator
=
(
const
ProxyInputStream
&
)
=
delete
;
...
...
src/input/plugins/AlsaInputPlugin.cxx
View file @
256cfc54
...
...
@@ -110,7 +110,7 @@ protected:
InvalidateSockets
();
}
void
DoSeek
(
gcc_unused
offset_type
new_offset
)
override
{
void
DoSeek
(
[[
maybe_unused
]]
offset_type
new_offset
)
override
{
/* unreachable because seekable==false */
SeekDone
();
}
...
...
@@ -289,7 +289,7 @@ AlsaInputStream::Recover(int err)
if
(
err
==
-
EAGAIN
)
return
0
;
/* fall-through to snd_pcm_prepare: */
#if
GCC_CHECK
_VERSION(7,0)
#if
CLANG_OR_GCC
_VERSION(7,0)
[[
fallthrough
]];
#endif
case
SND_PCM_STATE_OPEN
:
...
...
src/lib/curl/Global.cxx
View file @
256cfc54
...
...
@@ -108,7 +108,7 @@ CurlGlobal::CurlGlobal(EventLoop &_loop)
}
int
CurlSocket
::
SocketFunction
(
gcc_unused
CURL
*
easy
,
CurlSocket
::
SocketFunction
(
[[
maybe_unused
]]
CURL
*
easy
,
curl_socket_t
s
,
int
action
,
void
*
userp
,
void
*
socketp
)
noexcept
{
...
...
@@ -230,7 +230,7 @@ CurlGlobal::UpdateTimeout(long timeout_ms) noexcept
}
int
CurlGlobal
::
TimerFunction
(
gcc_unused
CURLM
*
_multi
,
long
timeout_ms
,
CurlGlobal
::
TimerFunction
(
[[
maybe_unused
]]
CURLM
*
_multi
,
long
timeout_ms
,
void
*
userp
)
noexcept
{
auto
&
global
=
*
(
CurlGlobal
*
)
userp
;
...
...
src/lib/dbus/AppendIter.hxx
View file @
256cfc54
...
...
@@ -80,7 +80,7 @@ public:
throw
std
::
runtime_error
(
"dbus_message_iter_append_fixed_array() failed"
);
return
*
this
;
}
;
}
AppendMessageIter
&
AppendFixedArray
(
ConstBuffer
<
uint32_t
>
value
)
{
return
AppendFixedArray
(
DBUS_TYPE_UINT32
,
...
...
src/lib/dbus/Error.hxx
View file @
256cfc54
...
...
@@ -71,7 +71,7 @@ public:
return
error
.
message
;
}
gcc_noreturn
[[
noreturn
]]
void
Throw
(
const
char
*
prefix
)
const
;
void
CheckThrow
(
const
char
*
prefix
)
const
;
};
...
...
src/lib/ffmpeg/LogCallback.cxx
View file @
256cfc54
...
...
@@ -47,7 +47,7 @@ FfmpegImportLogLevel(int level) noexcept
}
void
FfmpegLogCallback
(
gcc_unused
void
*
ptr
,
int
level
,
const
char
*
fmt
,
std
::
va_list
vl
)
FfmpegLogCallback
(
void
*
ptr
,
int
level
,
const
char
*
fmt
,
std
::
va_list
vl
)
{
const
AVClass
*
cls
=
nullptr
;
...
...
src/lib/nfs/Connection.cxx
View file @
256cfc54
...
...
@@ -172,7 +172,7 @@ NfsConnection::CancellableCallback::Callback(int err, void *data) noexcept
void
NfsConnection
::
CancellableCallback
::
Callback
(
int
err
,
gcc_unused
struct
nfs_context
*
nfs
,
[[
maybe_unused
]]
struct
nfs_context
*
nfs
,
void
*
data
,
void
*
private_data
)
noexcept
{
...
...
@@ -551,8 +551,8 @@ NfsConnection::OnSocketReady(unsigned flags) noexcept
}
inline
void
NfsConnection
::
MountCallback
(
int
status
,
gcc_unused
nfs_context
*
nfs
,
gcc_unused
void
*
data
)
noexcept
NfsConnection
::
MountCallback
(
int
status
,
[[
maybe_unused
]]
nfs_context
*
nfs
,
[[
maybe_unused
]]
void
*
data
)
noexcept
{
assert
(
GetEventLoop
().
IsInside
());
assert
(
context
==
nfs
);
...
...
src/lib/smbclient/Init.cxx
View file @
256cfc54
...
...
@@ -27,11 +27,11 @@
#include <string.h>
static
void
mpd_smbc_get_auth_data
(
gcc_unused
const
char
*
srv
,
gcc_unused
const
char
*
shr
,
char
*
wg
,
gcc_unused
int
wglen
,
char
*
un
,
gcc_unused
int
unlen
,
char
*
pw
,
gcc_unused
int
pwlen
)
mpd_smbc_get_auth_data
(
[[
maybe_unused
]]
const
char
*
srv
,
[[
maybe_unused
]]
const
char
*
shr
,
char
*
wg
,
[[
maybe_unused
]]
int
wglen
,
char
*
un
,
[[
maybe_unused
]]
int
unlen
,
char
*
pw
,
[[
maybe_unused
]]
int
pwlen
)
{
// TODO: implement
strcpy
(
wg
,
"WORKGROUP"
);
...
...
src/lib/sqlite/Util.hxx
View file @
256cfc54
...
...
@@ -54,7 +54,7 @@ Bind(sqlite3_stmt *stmt, unsigned i, const char *value)
template
<
typename
...
Args
>
static
void
BindAll2
(
gcc_unused
sqlite3_stmt
*
stmt
,
gcc_unused
unsigned
i
)
BindAll2
(
[[
maybe_unused
]]
sqlite3_stmt
*
stmt
,
[[
maybe_unused
]]
unsigned
i
)
{
assert
(
int
(
i
-
1
)
==
sqlite3_bind_parameter_count
(
stmt
));
}
...
...
src/lib/upnp/Action.hxx
View file @
256cfc54
...
...
@@ -32,7 +32,7 @@ CountNameValuePairs() noexcept
template
<
typename
...
Args
>
static
constexpr
unsigned
CountNameValuePairs
(
gcc_unused
const
char
*
name
,
gcc_unused
const
char
*
value
,
CountNameValuePairs
(
[[
maybe_unused
]]
const
char
*
name
,
[[
maybe_unused
]]
const
char
*
value
,
Args
...
args
)
noexcept
{
return
1
+
CountNameValuePairs
(
args
...);
...
...
src/lib/xiph/FlacIOHandle.cxx
View file @
256cfc54
...
...
@@ -119,7 +119,7 @@ FlacIOEof(FLAC__IOHandle handle)
}
static
int
FlacIOClose
(
gcc_unused
FLAC__IOHandle
handle
)
FlacIOClose
(
[[
maybe_unused
]]
FLAC__IOHandle
handle
)
{
/* no-op because the libFLAC caller is responsible for closing
the #InputStream */
...
...
src/mixer/plugins/AlsaMixerPlugin.cxx
View file @
256cfc54
...
...
@@ -173,7 +173,7 @@ AlsaMixer::Configure(const ConfigBlock &block)
}
static
Mixer
*
alsa_mixer_init
(
EventLoop
&
event_loop
,
gcc_unused
AudioOutput
&
ao
,
alsa_mixer_init
(
EventLoop
&
event_loop
,
[[
maybe_unused
]]
AudioOutput
&
ao
,
MixerListener
&
listener
,
const
ConfigBlock
&
block
)
{
...
...
src/mixer/plugins/HaikuMixerPlugin.cxx
View file @
256cfc54
...
...
@@ -47,9 +47,9 @@ public:
};
static
Mixer
*
haiku_mixer_init
(
gcc_unused
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
haiku_mixer_init
(
[[
maybe_unused
]]
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
MixerListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
)
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
new
HaikuMixer
((
HaikuOutput
&
)
ao
,
listener
);
}
...
...
src/mixer/plugins/NullMixerPlugin.cxx
View file @
256cfc54
...
...
@@ -49,10 +49,10 @@ public:
};
static
Mixer
*
null_mixer_init
(
gcc_unused
EventLoop
&
event_loop
,
gcc_unused
AudioOutput
&
ao
,
null_mixer_init
(
[[
maybe_unused
]]
EventLoop
&
event_loop
,
[[
maybe_unused
]]
AudioOutput
&
ao
,
MixerListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
)
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
new
NullMixer
(
listener
);
}
...
...
src/mixer/plugins/OSXMixerPlugin.cxx
View file @
256cfc54
...
...
@@ -54,9 +54,9 @@ OSXMixer::SetVolume(unsigned new_volume)
}
static
Mixer
*
osx_mixer_init
(
gcc_unused
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
osx_mixer_init
(
[[
maybe_unused
]]
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
MixerListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
)
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
OSXOutput
&
osxo
=
(
OSXOutput
&
)
ao
;
return
new
OSXMixer
(
osxo
,
listener
);
...
...
src/mixer/plugins/OssMixerPlugin.cxx
View file @
256cfc54
...
...
@@ -97,8 +97,8 @@ OssMixer::Configure(const ConfigBlock &block)
}
static
Mixer
*
oss_mixer_init
(
gcc_unused
EventLoop
&
event_loop
,
gcc_unused
AudioOutput
&
ao
,
oss_mixer_init
(
[[
maybe_unused
]]
EventLoop
&
event_loop
,
[[
maybe_unused
]]
AudioOutput
&
ao
,
MixerListener
&
listener
,
const
ConfigBlock
&
block
)
{
...
...
src/mixer/plugins/PulseMixerPlugin.cxx
View file @
256cfc54
...
...
@@ -104,7 +104,7 @@ PulseMixer::VolumeCallback(const pa_sink_input_info *i, int eol)
* value.
*/
static
void
pulse_mixer_volume_cb
(
gcc_unused
pa_context
*
context
,
const
pa_sink_input_info
*
i
,
pulse_mixer_volume_cb
(
[[
maybe_unused
]]
pa_context
*
context
,
const
pa_sink_input_info
*
i
,
int
eol
,
void
*
userdata
)
{
auto
*
pm
=
(
PulseMixer
*
)
userdata
;
...
...
@@ -133,7 +133,7 @@ PulseMixer::Update(pa_context *context, pa_stream *stream)
}
void
pulse_mixer_on_connect
(
gcc_unused
PulseMixer
&
pm
,
pulse_mixer_on_connect
(
[[
maybe_unused
]]
PulseMixer
&
pm
,
struct
pa_context
*
context
)
{
pa_operation
*
o
;
...
...
@@ -182,7 +182,7 @@ parse_volume_scale_factor(const char *value) {
}
static
Mixer
*
pulse_mixer_init
(
gcc_unused
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
pulse_mixer_init
(
[[
maybe_unused
]]
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
MixerListener
&
listener
,
const
ConfigBlock
&
block
)
{
...
...
src/mixer/plugins/SndioMixerPlugin.cxx
View file @
256cfc54
...
...
@@ -45,10 +45,10 @@ public:
};
static
Mixer
*
sndio_mixer_init
(
gcc_unused
EventLoop
&
event_loop
,
sndio_mixer_init
(
[[
maybe_unused
]]
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
MixerListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
)
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
new
SndioMixer
((
SndioOutput
&
)
ao
,
listener
);
}
...
...
src/mixer/plugins/SoftwareMixerPlugin.cxx
View file @
256cfc54
...
...
@@ -57,10 +57,10 @@ public:
};
static
Mixer
*
software_mixer_init
(
gcc_unused
EventLoop
&
event_loop
,
gcc_unused
AudioOutput
&
ao
,
software_mixer_init
(
[[
maybe_unused
]]
EventLoop
&
event_loop
,
[[
maybe_unused
]]
AudioOutput
&
ao
,
MixerListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
)
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
new
SoftwareMixer
(
listener
);
}
...
...
src/mixer/plugins/WinmmMixerPlugin.cxx
View file @
256cfc54
...
...
@@ -63,9 +63,9 @@ winmm_volume_encode(int volume)
}
static
Mixer
*
winmm_mixer_init
(
gcc_unused
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
winmm_mixer_init
(
[[
maybe_unused
]]
EventLoop
&
event_loop
,
AudioOutput
&
ao
,
MixerListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
)
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
new
WinmmMixer
((
WinmmOutput
&
)
ao
,
listener
);
}
...
...
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
View file @
256cfc54
...
...
@@ -252,9 +252,9 @@ SmbclientNeighborExplorer::ThreadFunc() noexcept
}
static
std
::
unique_ptr
<
NeighborExplorer
>
smbclient_neighbor_create
(
gcc_unused
EventLoop
&
loop
,
smbclient_neighbor_create
(
[[
maybe_unused
]]
EventLoop
&
loop
,
NeighborListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
)
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
SmbclientInit
();
...
...
src/neighbor/plugins/UdisksNeighborPlugin.cxx
View file @
256cfc54
...
...
@@ -259,7 +259,7 @@ UdisksNeighborExplorer::HandleMessage(DBusConnection *connection,
static
std
::
unique_ptr
<
NeighborExplorer
>
udisks_neighbor_create
(
EventLoop
&
event_loop
,
NeighborListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
)
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
std
::
make_unique
<
UdisksNeighborExplorer
>
(
event_loop
,
listener
);
}
...
...
src/neighbor/plugins/UpnpNeighborPlugin.cxx
View file @
256cfc54
...
...
@@ -127,7 +127,7 @@ UpnpNeighborExplorer::LostUPnP(const ContentDirectoryService &service)
static
std
::
unique_ptr
<
NeighborExplorer
>
upnp_neighbor_create
(
EventLoop
&
event_loop
,
NeighborListener
&
listener
,
gcc_unused
const
ConfigBlock
&
block
)
[[
maybe_unused
]]
const
ConfigBlock
&
block
)
{
return
std
::
make_unique
<
UpnpNeighborExplorer
>
(
event_loop
,
listener
);
}
...
...
src/output/Interface.cxx
View file @
256cfc54
...
...
@@ -23,8 +23,8 @@
#include <stdexcept>
void
AudioOutput
::
SetAttribute
(
gcc_unused
std
::
string
&&
name
,
gcc_unused
std
::
string
&&
value
)
AudioOutput
::
SetAttribute
(
[[
maybe_unused
]]
std
::
string
&&
name
,
[[
maybe_unused
]]
std
::
string
&&
value
)
{
throw
std
::
invalid_argument
(
"Unsupported attribute"
);
}
src/output/SharedPipeConsumer.hxx
View file @
256cfc54
...
...
@@ -76,7 +76,7 @@ public:
const
MusicChunk
*
Get
()
noexcept
;
void
Consume
(
gcc_unused
const
MusicChunk
&
_chunk
)
{
void
Consume
(
[[
maybe_unused
]]
const
MusicChunk
&
_chunk
)
{
assert
(
chunk
!=
nullptr
);
assert
(
chunk
==
&
_chunk
);
...
...
@@ -86,7 +86,7 @@ public:
gcc_pure
bool
IsConsumed
(
const
MusicChunk
&
_chunk
)
const
noexcept
;
void
ClearTail
(
gcc_unused
const
MusicChunk
&
_chunk
)
noexcept
{
void
ClearTail
(
[[
maybe_unused
]]
const
MusicChunk
&
_chunk
)
noexcept
{
assert
(
chunk
==
&
_chunk
);
assert
(
consumed
);
chunk
=
nullptr
;
...
...
src/output/plugins/AlsaOutputPlugin.cxx
View file @
256cfc54
...
...
@@ -763,7 +763,7 @@ AlsaOutput::Recover(int err) noexcept
if
(
err
==
-
EAGAIN
)
return
0
;
/* fall-through to snd_pcm_prepare: */
#if
GCC_CHECK
_VERSION(7,0)
#if
CLANG_OR_GCC
_VERSION(7,0)
[[
fallthrough
]];
#endif
case
SND_PCM_STATE_OPEN
:
...
...
src/output/plugins/HaikuOutputPlugin.cxx
View file @
256cfc54
...
...
@@ -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
;
...
...
src/output/plugins/NullOutputPlugin.cxx
View file @
256cfc54
...
...
@@ -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
();
...
...
src/output/plugins/OSXOutputPlugin.cxx
View file @
256cfc54
...
...
@@ -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
)
{
...
...
src/output/plugins/PipeOutputPlugin.cxx
View file @
256cfc54
...
...
@@ -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
)
...
...
src/output/plugins/PulseOutputPlugin.cxx
View file @
256cfc54
...
...
@@ -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
;
...
...
src/output/plugins/httpd/HttpdOutputPlugin.cxx
View file @
256cfc54
...
...
@@ -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 */
...
...
src/output/plugins/sles/SlesOutputPlugin.cxx
View file @
256cfc54
...
...
@@ -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
;
...
...
src/player/Thread.cxx
View file @
256cfc54
...
...
@@ -1176,7 +1176,9 @@ try {
}
/* fall through */
gcc_fallthrough
;
#if CLANG_OR_GCC_VERSION(7,0)
[[
fallthrough
]];
#endif
case
PlayerCommand
:
:
PAUSE
:
next_song
.
reset
();
...
...
src/playlist/plugins/EmbeddedCuePlaylistPlugin.cxx
View file @
256cfc54
...
...
@@ -82,7 +82,7 @@ ExtractCuesheetTagHandler::OnPair(StringView name, StringView value) noexcept
static
std
::
unique_ptr
<
SongEnumerator
>
embcue_playlist_open_uri
(
const
char
*
uri
,
gcc_unused
Mutex
&
mutex
)
[[
maybe_unused
]]
Mutex
&
mutex
)
{
if
(
!
PathTraitsUTF8
::
IsAbsolute
(
uri
))
/* only local files supported */
...
...
src/playlist/plugins/XspfPlaylistPlugin.cxx
View file @
256cfc54
...
...
@@ -79,7 +79,7 @@ static constexpr struct tag_table xspf_tag_elements[] = {
static
void
XMLCALL
xspf_start_element
(
void
*
user_data
,
const
XML_Char
*
element_name
,
gcc_unused
const
XML_Char
**
atts
)
[[
maybe_unused
]]
const
XML_Char
**
atts
)
{
auto
*
parser
=
(
XspfParser
*
)
user_data
;
parser
->
value
.
clear
();
...
...
src/storage/CompositeStorage.hxx
View file @
256cfc54
...
...
@@ -87,7 +87,7 @@ class CompositeStorage final : public Storage {
public
:
CompositeStorage
()
noexcept
;
virtual
~
CompositeStorage
()
;
~
CompositeStorage
()
override
;
/**
* Get the #Storage at the specified mount point. Returns
...
...
src/storage/MemoryDirectoryReader.cxx
View file @
256cfc54
...
...
@@ -36,7 +36,7 @@ MemoryStorageDirectoryReader::Read() noexcept
}
StorageFileInfo
MemoryStorageDirectoryReader
::
GetInfo
(
gcc_unused
bool
follow
)
MemoryStorageDirectoryReader
::
GetInfo
(
[[
maybe_unused
]]
bool
follow
)
{
assert
(
!
first
);
assert
(
!
entries
.
empty
());
...
...
src/storage/StorageInterface.cxx
View file @
256cfc54
...
...
@@ -22,7 +22,7 @@
#include "fs/Traits.hxx"
AllocatedPath
Storage
::
MapFS
(
gcc_unused
const
char
*
uri_utf8
)
const
noexcept
Storage
::
MapFS
(
[[
maybe_unused
]]
const
char
*
uri_utf8
)
const
noexcept
{
return
nullptr
;
}
...
...
src/storage/plugins/CurlStorage.cxx
View file @
256cfc54
...
...
@@ -315,7 +315,7 @@ private:
/* virtual methods from CommonExpatParser */
void
StartElement
(
const
XML_Char
*
name
,
gcc_unused
const
XML_Char
**
attrs
)
final
{
[[
maybe_unused
]]
const
XML_Char
**
attrs
)
final
{
switch
(
state
)
{
case
State
:
:
ROOT
:
if
(
strcmp
(
name
,
"DAV:|response"
)
==
0
)
...
...
@@ -447,7 +447,7 @@ protected:
};
StorageFileInfo
CurlStorage
::
GetInfo
(
const
char
*
uri_utf8
,
gcc_unused
bool
follow
)
CurlStorage
::
GetInfo
(
const
char
*
uri_utf8
,
[[
maybe_unused
]]
bool
follow
)
{
// TODO: escape the given URI
...
...
src/storage/plugins/NfsStorage.cxx
View file @
256cfc54
...
...
@@ -288,7 +288,7 @@ protected:
connection
.
Lstat
(
path
,
*
this
);
}
void
HandleResult
(
gcc_unused
unsigned
status
,
void
*
data
)
noexcept
override
{
void
HandleResult
(
[[
maybe_unused
]]
unsigned
status
,
void
*
data
)
noexcept
override
{
Copy
(
info
,
*
(
const
struct
nfs_stat_64
*
)
data
);
}
};
...
...
@@ -356,7 +356,7 @@ protected:
connection
.
OpenDirectory
(
path
,
*
this
);
}
void
HandleResult
(
gcc_unused
unsigned
status
,
void
HandleResult
(
[[
maybe_unused
]]
unsigned
status
,
void
*
data
)
noexcept
override
{
auto
*
const
dir
=
(
struct
nfsdir
*
)
data
;
...
...
src/storage/plugins/SmbclientStorage.cxx
View file @
256cfc54
...
...
@@ -117,7 +117,7 @@ GetInfo(const char *path)
}
StorageFileInfo
SmbclientStorage
::
GetInfo
(
const
char
*
uri_utf8
,
gcc_unused
bool
follow
)
SmbclientStorage
::
GetInfo
(
const
char
*
uri_utf8
,
[[
maybe_unused
]]
bool
follow
)
{
const
std
::
string
mapped
=
MapUTF8
(
uri_utf8
);
return
::
GetInfo
(
mapped
.
c_str
());
...
...
@@ -172,14 +172,14 @@ SmbclientDirectoryReader::Read() noexcept
}
StorageFileInfo
SmbclientDirectoryReader
::
GetInfo
(
gcc_unused
bool
follow
)
SmbclientDirectoryReader
::
GetInfo
(
[[
maybe_unused
]]
bool
follow
)
{
const
std
::
string
path
=
PathTraitsUTF8
::
Build
(
base
.
c_str
(),
name
);
return
::
GetInfo
(
path
.
c_str
());
}
static
std
::
unique_ptr
<
Storage
>
CreateSmbclientStorageURI
(
gcc_unused
EventLoop
&
event_loop
,
const
char
*
base
)
CreateSmbclientStorageURI
(
[[
maybe_unused
]]
EventLoop
&
event_loop
,
const
char
*
base
)
{
if
(
!
StringStartsWithCaseASCII
(
base
,
"smb://"
))
return
nullptr
;
...
...
src/system/EventFD.cxx
View file @
256cfc54
...
...
@@ -56,6 +56,6 @@ EventFD::Write() noexcept
assert
(
fd
.
IsDefined
());
static
constexpr
eventfd_t
value
=
1
;
gcc_unused
ssize_t
nbytes
=
[[
maybe_unused
]]
ssize_t
nbytes
=
fd
.
Write
(
&
value
,
sizeof
(
value
));
}
src/system/EventPipe.cxx
View file @
256cfc54
...
...
@@ -85,7 +85,7 @@ EventPipe::Write() noexcept
#ifdef _WIN32
send
(
fds
[
1
],
""
,
1
,
0
);
#else
gcc_unused
ssize_t
nbytes
=
write
(
fds
[
1
],
""
,
1
);
[[
maybe_unused
]]
ssize_t
nbytes
=
write
(
fds
[
1
],
""
,
1
);
#endif
}
...
...
src/system/FatalError.cxx
View file @
256cfc54
...
...
@@ -36,7 +36,7 @@
static
constexpr
Domain
fatal_error_domain
(
"fatal_error"
);
gcc_noreturn
[[
noreturn
]]
static
void
Abort
()
{
...
...
src/system/FatalError.hxx
View file @
256cfc54
...
...
@@ -29,11 +29,11 @@
/**
* Log the specified message and abort the process.
*/
gcc_noreturn
[[
noreturn
]]
void
FatalError
(
const
char
*
msg
);
gcc_noreturn
[[
noreturn
]]
void
FormatFatalError
(
const
char
*
fmt
,
...);
...
...
@@ -42,19 +42,19 @@ FormatFatalError(const char *fmt, ...);
* fail. Prints the given message, the system error message (from
* errno or GetLastError()) and abort the process.
*/
gcc_noreturn
[[
noreturn
]]
void
FatalSystemError
(
const
char
*
msg
);
#ifdef _WIN32
gcc_noreturn
[[
noreturn
]]
void
FatalSystemError
(
const
char
*
msg
,
DWORD
code
);
#endif
gcc_noreturn
[[
noreturn
]]
void
FormatFatalSystemError
(
const
char
*
fmt
,
...);
...
...
src/tag/Handler.cxx
View file @
256cfc54
...
...
@@ -41,7 +41,7 @@ NullTagHandler::OnPicture(const char *, ConstBuffer<void>) noexcept
}
void
NullTagHandler
::
OnAudioFormat
(
gcc_unused
AudioFormat
af
)
noexcept
NullTagHandler
::
OnAudioFormat
(
[[
maybe_unused
]]
AudioFormat
af
)
noexcept
{
}
...
...
src/tag/Handler.hxx
View file @
256cfc54
...
...
@@ -124,7 +124,7 @@ public:
explicit
NullTagHandler
(
unsigned
_want_mask
)
noexcept
:
TagHandler
(
_want_mask
)
{}
void
OnDuration
(
gcc_unused
SongTime
duration
)
noexcept
override
{}
void
OnDuration
(
[[
maybe_unused
]]
SongTime
duration
)
noexcept
override
{}
void
OnTag
(
TagType
type
,
StringView
value
)
noexcept
override
;
void
OnPair
(
StringView
key
,
StringView
value
)
noexcept
override
;
void
OnAudioFormat
(
AudioFormat
af
)
noexcept
override
;
...
...
src/thread/Mutex.hxx
View file @
256cfc54
...
...
@@ -53,7 +53,7 @@ class ScopeUnlock {
public
:
explicit
ScopeUnlock
(
Mutex
&
_mutex
)
noexcept
:
mutex
(
_mutex
)
{
mutex
.
unlock
();
}
;
}
~
ScopeUnlock
()
noexcept
{
mutex
.
lock
();
...
...
src/thread/Name.hxx
View file @
256cfc54
...
...
@@ -58,7 +58,7 @@ SetThreadName(const char *name) noexcept
template
<
typename
...
Args
>
static
inline
void
FormatThreadName
(
const
char
*
fmt
,
gcc_unused
Args
&&
...
args
)
noexcept
FormatThreadName
(
const
char
*
fmt
,
[[
maybe_unused
]]
Args
&&
...
args
)
noexcept
{
#ifdef HAVE_THREAD_NAME
SetThreadName
(
StringFormat
<
16
>
(
fmt
,
args
...));
...
...
src/unix/Daemon.hxx
View file @
256cfc54
...
...
@@ -45,10 +45,12 @@ daemonize_finish()
* pid file.
*/
#ifndef _WIN32
[[
noreturn
]]
void
daemonize_kill
();
#else
#include <stdexcept>
[[
noreturn
]]
static
inline
void
daemonize_kill
()
{
...
...
src/util/Alloc.cxx
View file @
256cfc54
...
...
@@ -25,7 +25,7 @@
#include <string.h>
#include <unistd.h>
gcc_noreturn
[[
noreturn
]]
static
void
oom
()
{
...
...
src/util/Compiler.h
View file @
256cfc54
...
...
@@ -68,16 +68,12 @@
/* GCC 4.x */
#define gcc_const __attribute__((const))
#define gcc_deprecated __attribute__((deprecated))
#define gcc_may_alias __attribute__((may_alias))
#define gcc_malloc __attribute__((malloc))
#define gcc_noreturn __attribute__((noreturn))
#define gcc_packed __attribute__((packed))
#define gcc_printf(a,b) __attribute__((format(printf, a, b)))
#define gcc_pure __attribute__((pure))
#define gcc_sentinel __attribute__((sentinel))
#define gcc_unused __attribute__((unused))
#define gcc_warn_unused_result __attribute__((warn_unused_result))
#define gcc_nonnull(...) __attribute__((nonnull(__VA_ARGS__)))
#define gcc_nonnull_all __attribute__((nonnull))
...
...
@@ -98,16 +94,12 @@
/* generic C compiler */
#define gcc_const
#define gcc_deprecated
#define gcc_may_alias
#define gcc_malloc
#define gcc_noreturn
#define gcc_packed
#define gcc_printf(a,b)
#define gcc_pure
#define gcc_sentinel
#define gcc_unused
#define gcc_warn_unused_result
#define gcc_nonnull(...)
#define gcc_nonnull_all
...
...
@@ -167,12 +159,6 @@
#define __has_feature(x) 0
#endif
#if __has_feature(attribute_unused_on_fields)
#define gcc_unused_field gcc_unused
#else
#define gcc_unused_field
#endif
#if defined(__GNUC__) || defined(__clang__)
#define gcc_unreachable() __builtin_unreachable()
#else
...
...
src/util/Exception.hxx
View file @
256cfc54
...
...
@@ -42,14 +42,14 @@
* the std::exception_ptr itself.
*/
template
<
typename
T
>
gcc_noreturn
[[
noreturn
]]
inline
void
ThrowException
(
T
&&
t
)
{
throw
std
::
forward
<
T
>
(
t
);
}
gcc_noreturn
[[
noreturn
]]
inline
void
ThrowException
(
std
::
exception_ptr
ep
)
{
...
...
src/util/UTF8.cxx
View file @
256cfc54
...
...
@@ -204,7 +204,7 @@ struct CheckSequenceUTF8 {
template
<>
struct
CheckSequenceUTF8
<
0U
>
{
constexpr
bool
operator
()(
gcc_unused
const
char
*
p
)
const
noexcept
{
constexpr
bool
operator
()(
[[
maybe_unused
]]
const
char
*
p
)
const
noexcept
{
return
true
;
}
};
...
...
src/win32/Win32Main.cxx
View file @
256cfc54
...
...
@@ -64,8 +64,8 @@ service_notify_status(DWORD status_code)
}
static
DWORD
WINAPI
service_dispatcher
(
gcc_unused
DWORD
control
,
gcc_unused
DWORD
event_type
,
gcc_unused
void
*
event_data
,
gcc_unused
void
*
context
)
service_dispatcher
(
[[
maybe_unused
]]
DWORD
control
,
[[
maybe_unused
]]
DWORD
event_type
,
[[
maybe_unused
]]
void
*
event_data
,
[[
maybe_unused
]]
void
*
context
)
{
switch
(
control
)
{
case
SERVICE_CONTROL_SHUTDOWN
:
...
...
@@ -78,7 +78,7 @@ service_dispatcher(gcc_unused DWORD control, gcc_unused DWORD event_type,
}
static
void
WINAPI
service_main
(
gcc_unused
DWORD
argc
,
gcc_unused
LPTSTR
argv
[])
service_main
(
[[
maybe_unused
]]
DWORD
argc
,
[[
maybe_unused
]]
LPTSTR
argv
[])
{
service_handle
=
RegisterServiceCtrlHandlerEx
(
service_name
,
...
...
src/zeroconf/ZeroconfAvahi.cxx
View file @
256cfc54
...
...
@@ -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
);
...
...
src/zeroconf/ZeroconfBonjour.cxx
View file @
256cfc54
...
...
@@ -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
,
...
...
src/zeroconf/ZeroconfGlue.cxx
View file @
256cfc54
...
...
@@ -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
;
...
...
test/DumpDecoderClient.cxx
View file @
256cfc54
...
...
@@ -86,26 +86,26 @@ DumpDecoderClient::Read(InputStream &is, void *buffer, size_t length) noexcept
}
void
DumpDecoderClient
::
SubmitTimestamp
(
gcc_unused
FloatDuration
t
)
noexcept
DumpDecoderClient
::
SubmitTimestamp
(
[[
maybe_unused
]]
FloatDuration
t
)
noexcept
{
}
DecoderCommand
DumpDecoderClient
::
SubmitData
(
gcc_unused
InputStream
*
is
,
DumpDecoderClient
::
SubmitData
(
[[
maybe_unused
]]
InputStream
*
is
,
const
void
*
data
,
size_t
datalen
,
gcc_unused
uint16_t
kbit_rate
)
noexcept
[[
maybe_unused
]]
uint16_t
kbit_rate
)
noexcept
{
if
(
kbit_rate
!=
prev_kbit_rate
)
{
prev_kbit_rate
=
kbit_rate
;
fprintf
(
stderr
,
"%u kbit/s
\n
"
,
kbit_rate
);
}
gcc_unused
ssize_t
nbytes
=
write
(
STDOUT_FILENO
,
data
,
datalen
);
[[
maybe_unused
]]
ssize_t
nbytes
=
write
(
STDOUT_FILENO
,
data
,
datalen
);
return
GetCommand
();
}
DecoderCommand
DumpDecoderClient
::
SubmitTag
(
gcc_unused
InputStream
*
is
,
DumpDecoderClient
::
SubmitTag
(
[[
maybe_unused
]]
InputStream
*
is
,
Tag
&&
tag
)
noexcept
{
fprintf
(
stderr
,
"TAG: duration=%f
\n
"
,
tag
.
duration
.
ToDoubleS
());
...
...
@@ -139,7 +139,7 @@ DumpDecoderClient::SubmitReplayGain(const ReplayGainInfo *rgi) noexcept
}
void
DumpDecoderClient
::
SubmitMixRamp
(
gcc_unused
MixRampInfo
&&
mix_ramp
)
noexcept
DumpDecoderClient
::
SubmitMixRamp
(
[[
maybe_unused
]]
MixRampInfo
&&
mix_ramp
)
noexcept
{
fprintf
(
stderr
,
"MixRamp: start='%s' end='%s'
\n
"
,
mix_ramp
.
GetStart
(),
mix_ramp
.
GetEnd
());
...
...
test/MakeTag.hxx
View file @
256cfc54
...
...
@@ -22,7 +22,7 @@
#include "util/Compiler.h"
inline
void
BuildTag
(
gcc_unused
TagBuilder
&
tag
)
noexcept
BuildTag
(
[[
maybe_unused
]]
TagBuilder
&
tag
)
noexcept
{
}
...
...
test/ReadApeTags.cxx
View file @
256cfc54
...
...
@@ -34,7 +34,7 @@
#endif
static
bool
MyApeTagCallback
(
gcc_unused
unsigned
long
flags
,
MyApeTagCallback
(
[[
maybe_unused
]]
unsigned
long
flags
,
const
char
*
key
,
StringView
value
)
{
if
((
flags
&
(
0x3
<<
1
))
==
0
)
...
...
test/read_mixer.cxx
View file @
256cfc54
...
...
@@ -30,13 +30,13 @@
#include <stdlib.h>
const
FilterPlugin
*
filter_plugin_by_name
(
gcc_unused
const
char
*
name
)
noexcept
filter_plugin_by_name
(
[[
maybe_unused
]]
const
char
*
name
)
noexcept
{
assert
(
false
);
return
nullptr
;
}
int
main
(
int
argc
,
gcc_unused
char
**
argv
)
int
main
(
int
argc
,
[[
maybe_unused
]]
char
**
argv
)
try
{
int
volume
;
...
...
test/run_avahi.cxx
View file @
256cfc54
...
...
@@ -26,7 +26,7 @@
unsigned
listen_port
=
1234
;
int
main
(
gcc_unused
int
argc
,
gcc_unused
char
**
argv
)
main
(
[[
maybe_unused
]]
int
argc
,
[[
maybe_unused
]]
char
**
argv
)
{
EventLoop
event_loop
;
const
ShutdownHandler
shutdown_handler
(
event_loop
);
...
...
test/run_convert.cxx
View file @
256cfc54
...
...
@@ -137,7 +137,7 @@ try {
auto
output
=
state
.
Convert
({
src
.
data
,
src
.
size
});
gcc_unused
ssize_t
ignored
=
write
(
1
,
output
.
data
,
[[
maybe_unused
]]
ssize_t
ignored
=
write
(
1
,
output
.
data
,
output
.
size
);
}
...
...
@@ -146,7 +146,7 @@ try {
if
(
output
.
IsNull
())
break
;
gcc_unused
ssize_t
ignored
=
write
(
1
,
output
.
data
,
[[
maybe_unused
]]
ssize_t
ignored
=
write
(
1
,
output
.
data
,
output
.
size
);
}
...
...
test/run_filter.cxx
View file @
256cfc54
...
...
@@ -42,8 +42,8 @@
#include <stdio.h>
void
mixer_set_volume
(
gcc_unused
Mixer
*
mixer
,
gcc_unused
unsigned
volume
)
mixer_set_volume
(
[[
maybe_unused
]]
Mixer
*
mixer
,
[[
maybe_unused
]]
unsigned
volume
)
{
}
...
...
test/run_gunzip.cxx
View file @
256cfc54
...
...
@@ -55,7 +55,7 @@ CopyGunzip(FILE *_dest, Path src_path)
}
int
main
(
int
argc
,
gcc_unused
char
**
argv
)
main
(
int
argc
,
[[
maybe_unused
]]
char
**
argv
)
try
{
if
(
argc
!=
2
)
{
fprintf
(
stderr
,
"Usage: run_gunzip PATH
\n
"
);
...
...
test/run_gzip.cxx
View file @
256cfc54
...
...
@@ -59,7 +59,7 @@ CopyGzip(FILE *_dest, int src)
}
int
main
(
int
argc
,
gcc_unused
char
**
argv
)
main
(
int
argc
,
[[
maybe_unused
]]
char
**
argv
)
try
{
if
(
argc
!=
1
)
{
fprintf
(
stderr
,
"Usage: run_gzip
\n
"
);
...
...
test/run_inotify.cxx
View file @
256cfc54
...
...
@@ -34,8 +34,8 @@ static constexpr unsigned IN_MASK =
|
IN_MOVE
|
IN_MOVE_SELF
;
static
void
my_inotify_callback
(
gcc_unused
int
wd
,
unsigned
mask
,
const
char
*
name
,
gcc_unused
void
*
ctx
)
my_inotify_callback
(
[[
maybe_unused
]]
int
wd
,
unsigned
mask
,
const
char
*
name
,
[[
maybe_unused
]]
void
*
ctx
)
{
printf
(
"mask=0x%x name='%s'
\n
"
,
mask
,
name
);
}
...
...
test/run_normalize.cxx
View file @
256cfc54
...
...
@@ -57,7 +57,7 @@ try {
Compressor_Process_int16
(
compressor
,
(
int16_t
*
)
buffer
,
nbytes
/
2
);
gcc_unused
ssize_t
ignored
=
write
(
1
,
buffer
,
nbytes
);
[[
maybe_unused
]]
ssize_t
ignored
=
write
(
1
,
buffer
,
nbytes
);
}
Compressor_delete
(
compressor
);
...
...
test/software_volume.cxx
View file @
256cfc54
...
...
@@ -58,7 +58,7 @@ try {
while
((
nbytes
=
read
(
0
,
buffer
,
sizeof
(
buffer
)))
>
0
)
{
auto
dest
=
pv
.
Apply
({
buffer
,
size_t
(
nbytes
)});
gcc_unused
ssize_t
ignored
=
write
(
1
,
dest
.
data
,
dest
.
size
);
[[
maybe_unused
]]
ssize_t
ignored
=
write
(
1
,
dest
.
data
,
dest
.
size
);
}
pv
.
Close
();
...
...
test/test_translate_song.cxx
View file @
256cfc54
...
...
@@ -85,8 +85,8 @@ static const char *uri1 = "/foo/bar.ogg";
static
const
char
*
uri2
=
"foo/bar.ogg"
;
DetachedSong
DatabaseDetachSong
(
gcc_unused
const
Database
&
db
,
gcc_unused
const
Storage
*
_storage
,
DatabaseDetachSong
(
[[
maybe_unused
]]
const
Database
&
db
,
[[
maybe_unused
]]
const
Storage
*
_storage
,
const
char
*
uri
)
{
if
(
strcmp
(
uri
,
uri2
)
==
0
)
...
...
@@ -119,7 +119,7 @@ Client::GetStorage() const noexcept
}
void
Client
::
AllowFile
(
gcc_unused
Path
path_fs
)
const
Client
::
AllowFile
(
[[
maybe_unused
]]
Path
path_fs
)
const
{
/* always fail, so a SongLoader with a non-nullptr
Client pointer will be regarded "insecure", while one with
...
...
test/test_vorbis_encoder.cxx
View file @
256cfc54
...
...
@@ -36,7 +36,7 @@
static
uint8_t
zero
[
256
];
int
main
(
gcc_unused
int
argc
,
gcc_unused
char
**
argv
)
main
(
[[
maybe_unused
]]
int
argc
,
[[
maybe_unused
]]
char
**
argv
)
try
{
/* create the encoder */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment