[Cmake-commits] [cmake-commits] perera committed TestDriver.cxx.in 1.6 1.7
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Nov 25 09:52:23 EST 2008
Update of /cvsroot/CMake/CMake/Templates
In directory public:/mounts/ram/cvs-serv10058/Templates
Modified Files:
TestDriver.cxx.in
Log Message:
BUG: the return value of scanf should not be ignored
Index: TestDriver.cxx.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Templates/TestDriver.cxx.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** TestDriver.cxx.in 16 Jul 2004 19:18:42 -0000 1.6
--- TestDriver.cxx.in 25 Nov 2008 14:52:21 -0000 1.7
***************
*** 71,75 ****
fflush(stdout);
testNum = 0;
! scanf("%d", &testNum);
if (testNum >= NumTests)
{
--- 71,79 ----
fflush(stdout);
testNum = 0;
! if( scanf("%d", &testNum) != 1 )
! {
! printf("Couldn't parse that input as a number\n");
! return -1;
! }
if (testNum >= NumTests)
{
More information about the Cmake-commits
mailing list