+7
−1
Loading
Although in debug mode the NVME_TQPAIR_DEBUGLOG macro expands to
do {
if (!((tqpair) ? & (tqpair)->qpair : ((void *)0))) {
do { } while (0);
} else if (!((tqpair) ? & (tqpair)->qpair : ((void *)0))->ctrlr) {
do { } while (0);
} else {
do { } while (0);
}
} while (0);
and clearly should be optimized out in release mode, it somehow prevents
the compiler from reporting an unused variable warning when the only consumer of
the variable is such a DEBUGLOG macro.
Fix this by adding #ifdef DEBUG around NVME_[CTRLR|QPAIR]_DEBUGLOG
macros.
With or without this change, no assembly instructions are generated for
_DEBUGLOG macros in release mode.
Change-Id: I269f41929833f8fbc77f1a3276f2aa47aef67489
Signed-off-by:
Jacek Kalwas <jacek.kalwas@nutanix.com>
Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26591
Community-CI: Mellanox Build Bot
Reviewed-by:
Jim Harris <jim.harris@nvidia.com>
Tested-by:
SPDK Automated Test System <spdkbot@gmail.com>
Reviewed-by:
Tomasz Zawadzki <tomasz@tzawadzki.com>