From 89aca9f766814af8a8c28680dde2e15c6631312e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 10 Jan 2019 17:19:48 +0100 Subject: [PATCH] Fix the warning [-Wunused-result] --- Box_intersection_d/test/Box_intersection_d/util.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Box_intersection_d/test/Box_intersection_d/util.h b/Box_intersection_d/test/Box_intersection_d/util.h index 78310bdad0b..6f1b351f6c8 100644 --- a/Box_intersection_d/test/Box_intersection_d/util.h +++ b/Box_intersection_d/test/Box_intersection_d/util.h @@ -32,8 +32,10 @@ struct Util { std::vector< int > minc( numDim ), maxc( numDim ); /* Read boxes */ for(boxNum = 0; boxNum < numBoxes; boxNum++) { - for(dim = 0; dim < numDim; dim++) - (void)std::fscanf( infile, "[%d, %d) ", &minc[dim], &maxc[dim] ); + for(dim = 0; dim < numDim; dim++) { + n = std::fscanf( infile, "[%d, %d) ", &minc[dim], &maxc[dim] ); + assert( n == 2); + } boxes.push_back( Box( &minc[0], &maxc[0] ) ); n = std::fscanf(infile, "\n"); assert(n == 0);