diff --git a/src/libCom/test/epicsEventTest.cpp b/src/libCom/test/epicsEventTest.cpp index 7fcc6c697..e664d7281 100644 --- a/src/libCom/test/epicsEventTest.cpp +++ b/src/libCom/test/epicsEventTest.cpp @@ -129,7 +129,8 @@ static void eventWaitTest() { double errorSum = 0.0; epicsEventId event = epicsEventMustCreate ( epicsEventEmpty ); - for ( int i = 0u; i < 20; i++ ) { + int i; + for ( i = 0u; i < 20; i++ ) { double delay = ldexp ( 1.0 , -i ); errorSum += eventWaitMeasureDelayError ( event, delay ); } diff --git a/src/libCom/test/epicsThreadTest.cpp b/src/libCom/test/epicsThreadTest.cpp index f253a373a..9381a1ce4 100644 --- a/src/libCom/test/epicsThreadTest.cpp +++ b/src/libCom/test/epicsThreadTest.cpp @@ -70,7 +70,8 @@ static double threadSleepMeasureDelayError( const double & delay ) static void threadSleepTest() { double errorSum = 0.0; - for ( int i = 0u; i < 20; i++ ) { + int i; + for ( i = 0u; i < 20; i++ ) { double delay = ldexp ( 1.0 , -i ); errorSum += threadSleepMeasureDelayError ( delay ); }