aboutsummaryrefslogtreecommitdiffstats
path: root/tests/checkasm/checkasm.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2022-05-25 10:27:37 +0300
committerMartin Storsjö <martin@martin.st>2022-08-08 23:39:13 +0300
commit5cdf4c0beda54c8fa5da7914c05b9ee28332c9b5 (patch)
treef08ac695fe6ff09152ae0f9bb4d6a4b873c6604e /tests/checkasm/checkasm.h
parenta5e025e826789164569d2ff44a784cd3f953eaca (diff)
downloadffmpeg-5cdf4c0beda54c8fa5da7914c05b9ee28332c9b5.tar.gz
checkasm: Silence warnings about unused return value from read()
This codepath is enabled by default on arm, if the linux perf API is available, unless disabled with --disable-linux-perf. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'tests/checkasm/checkasm.h')
-rw-r--r--tests/checkasm/checkasm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index b601a98754..d7645d3730 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -230,8 +230,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()