From b9563518c6d0168f731fbea58ae267f270658977 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 23 Apr 2021 20:07:49 +0000 Subject: [PATCH] thread: do not ignore read() return This fixes unused-result warning which prevents building with -Werror. Fixes: 924d4bf ("poller: add busy wait mechanism for intr") Signed-off-by: Jim Harris Change-Id: I074949b65e68405033322af34d90e96a896c8b8c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7593 Reviewed-by: Tomasz Zawadzki Reviewed-by: Ben Walker Reviewed-by: Xiaodong Liu Reviewed-by: Reviewed-by: Aleksey Marchuk Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot --- lib/thread/thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/thread/thread.c b/lib/thread/thread.c index ff519983b..4c4b5da5a 100644 --- a/lib/thread/thread.c +++ b/lib/thread/thread.c @@ -1119,6 +1119,7 @@ busy_poller_set_interrupt_mode(struct spdk_poller *poller, void *cb_arg, bool in { int busy_efd = poller->interruptfd; uint64_t notify = 1; + int rc __attribute__((unused)); assert(busy_efd >= 0); @@ -1129,7 +1130,7 @@ busy_poller_set_interrupt_mode(struct spdk_poller *poller, void *cb_arg, bool in } } else { /* Read on eventfd will clear its level triggering. */ - read(busy_efd, ¬ify, sizeof(notify)); + rc = read(busy_efd, ¬ify, sizeof(notify)); } }