Merge remote-tracking branches 'neheb/fwhfggwe', 'neheb/nvm2', 'neheb/nvm22', 'neheb/bvm' and 'neheb/cl2'

This commit is contained in:
Max Kellermann
2020-03-16 17:25:50 +01:00
116 changed files with 253 additions and 262 deletions

View File

@@ -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;

View File

@@ -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,

View File

@@ -71,7 +71,7 @@ public:
return error.message;
}
gcc_noreturn
[[noreturn]]
void Throw(const char *prefix) const;
void CheckThrow(const char *prefix) const;
};

View File

@@ -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;

View File

@@ -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);

View File

@@ -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");

View File

@@ -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));
}

View File

@@ -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...);

View File

@@ -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 */