diff mbox series

[FFmpeg-devel] checkasm: Silence warnings about unused return value from read()

Message ID 20220525074338.7879-1-martin@martin.st
State New
Headers show
Series [FFmpeg-devel] checkasm: Silence warnings about unused return value from read() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Martin Storsjö May 25, 2022, 7:43 a.m. UTC
This codepath is enabled by default on arm, if the linux perf API
is available, unless disabled with --disable-linux-perf.
---
 tests/checkasm/checkasm.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index a86db140e3..7fd1e1606d 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -229,8 +229,10 @@  typedef struct CheckasmPerf {
     ioctl(sysfd, PERF_EVENT_IOC_ENABLE, 0);             \
 } while (0)
 #define PERF_STOP(t) do {                               \
+    int ret;                                            \
     ioctl(sysfd, PERF_EVENT_IOC_DISABLE, 0);            \
-    read(sysfd, &t, sizeof(t));                         \
+    ret = read(sysfd, &t, sizeof(t));                   \
+    (void)ret;                                          \
 } while (0)
 #elif CONFIG_MACOS_KPERF
 #define PERF_START(t) t = ff_kperf_cycles()