From 3bae0a2d5cfde449e0890effdcbee96939bc2ea2 Mon Sep 17 00:00:00 2001 From: paboyle Date: Sat, 6 May 2017 15:51:42 +0100 Subject: [PATCH] Drop a gcc warning --- lib/perfmon/PerfCount.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/perfmon/PerfCount.h b/lib/perfmon/PerfCount.h index 5e8cb4d0..9e83e383 100644 --- a/lib/perfmon/PerfCount.h +++ b/lib/perfmon/PerfCount.h @@ -206,11 +206,13 @@ public: count=0; cycles=0; #ifdef __linux__ + ssize_t ign; if ( fd!= -1) { ::ioctl(fd, PERF_EVENT_IOC_DISABLE, 0); ::ioctl(cyclefd, PERF_EVENT_IOC_DISABLE, 0); - ::read(fd, &count, sizeof(long long)); - ::read(cyclefd, &cycles, sizeof(long long)); + ign=::read(fd, &count, sizeof(long long)); + ign+=::read(cyclefd, &cycles, sizeof(long long)); + assert(ign=2*sizeof(longlong)); } elapsed = cyclecount() - begin; #else