From 341acaeaf6ce22e85ca90d813640b110d156d6b7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 10 Dec 2018 14:13:06 +0100 Subject: [PATCH] Another way to fix the warning --- 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 01e7a424ebd..78310bdad0b 100644 --- a/Box_intersection_d/test/Box_intersection_d/util.h +++ b/Box_intersection_d/test/Box_intersection_d/util.h @@ -27,14 +27,16 @@ struct Util { int numBoxes, numDim; int boxNum, dim; - (void)std::fscanf(infile, "%d %d\n", &numBoxes, &numDim); + int n = std::fscanf(infile, "%d %d\n", &numBoxes, &numDim); + assert(n == 2); CGAL_USE(n); 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] ); boxes.push_back( Box( &minc[0], &maxc[0] ) ); - (void)std::fscanf(infile, "\n"); + n = std::fscanf(infile, "\n"); + assert(n == 0); } }