thread: fix set-but-unused warning
In release builds, the assert() is compiled out, making it look like the rc value is never referenced after it's set. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I59305b0e928f2044146e30b7addc86f81e7a1d3f Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473472 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
e9be9df45f
commit
750f2b4b3d
@ -1199,7 +1199,7 @@ spdk_for_each_channel(void *io_device, spdk_channel_msg fn, void *ctx,
|
|||||||
struct spdk_thread *thread;
|
struct spdk_thread *thread;
|
||||||
struct spdk_io_channel *ch;
|
struct spdk_io_channel *ch;
|
||||||
struct spdk_io_channel_iter *i;
|
struct spdk_io_channel_iter *i;
|
||||||
int rc;
|
int rc __attribute__((unused));
|
||||||
|
|
||||||
i = calloc(1, sizeof(*i));
|
i = calloc(1, sizeof(*i));
|
||||||
if (!i) {
|
if (!i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user