]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add "UNUSED(fctx);" to FCTXTRACE*() macro stubs
authorMichał Kępień <michal@isc.org>
Mon, 21 Feb 2022 09:50:38 +0000 (10:50 +0100)
committerMichał Kępień <michal@isc.org>
Mon, 21 Feb 2022 09:50:38 +0000 (10:50 +0100)
commitb645e28167b28b11fb88f27258b98484acacaada
treeab3410ac38c57f6bc558de60811246c70f1490c7
parentd0c2113693860fc6acefd92a0450a9dcb9df6bdc
Add "UNUSED(fctx);" to FCTXTRACE*() macro stubs

Commit b6d40b3c4e4452cee6f7f06d889e4e8d113e9588 removed most uses of the
'fctx' variable from the rctx_dispfail() function: it is now only needed
by the FCTXTRACE3() macro.  However, when --enable-querytrace is not in
effect, that macro evaluates to a list of UNUSED() macros that does not
include "UNUSED(fctx);".  This triggers the following compilation
warning when building without --enable-querytrace:

    resolver.c: In function 'rctx_dispfail':
    resolver.c:7888:21: warning: unused variable 'fctx' [-Wunused-variable]
     7888 |         fetchctx_t *fctx = rctx->fctx;
          |                     ^~~~

Fix by adding "UNUSED(fctx);" lines to all FCTXTRACE*() macros.  This is
safe to do because all of those macros use the 'fctx' local variable, so
there is no danger of introducing new errors caused by use of undeclared
identifiers.
lib/dns/resolver.c