refactor: only use [[maybe_unused]] if arg might be used (#2033)

* refactor: [[maybe_unused]] iff arg _might_ be used

If the arg is never used, comment out its name.
If the arg is _sometimes_ used e.g. with ifdefs, use [[maybe_unused]].
This commit is contained in:
Charles Kerr
2021-10-24 11:41:54 -05:00
committed by GitHub
parent 16acdf5934
commit c472cbd88d
39 changed files with 163 additions and 210 deletions
+4 -4
View File
@@ -138,10 +138,10 @@ static char* tr_strlratio(char* buf, double ratio, size_t buflen)
static bool waitingOnWeb;
static void onTorrentFileDownloaded(
[[maybe_unused]] tr_session* session,
[[maybe_unused]] bool did_connect,
[[maybe_unused]] bool did_timeout,
[[maybe_unused]] long response_code,
tr_session* /*session*/,
bool /*did_connect*/,
bool /*did_timeout*/,
long /*response_code*/,
void const* response,
size_t response_byte_count,
void* vctor)