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

View File

@@ -83,7 +83,7 @@ static bool check_polarssl_result(int result, int expected_result, char const* f
****
***/
static int my_rand([[maybe_unused]] void* context, unsigned char* buffer, size_t buffer_size)
static int my_rand(void* /*context*/, unsigned char* buffer, size_t buffer_size)
{
for (size_t i = 0; i < buffer_size; ++i)
{