rtems compilation warnings (int32 != int)

This commit is contained in:
Matej Sekoranja
2014-11-26 14:12:09 +01:00
parent de1478d7ba
commit f2b43b704c
3 changed files with 10 additions and 10 deletions

View File

@@ -35,7 +35,7 @@ void testTimeStampInternal()
current.getCurrent();
printf("current %lli %i milliSec %lli\n",
(long long)current.getSecondsPastEpoch(),
current.getNanoseconds(),
(int)current.getNanoseconds(),
(long long)current.getMilliseconds());
time_t tt;
current.toTime_t(tt);
@@ -45,13 +45,13 @@ void testTimeStampInternal()
"%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d %d isDst %s\n",
ctm.tm_year+1900,ctm.tm_mon + 1,ctm.tm_mday,
ctm.tm_hour,ctm.tm_min,ctm.tm_sec,
current.getNanoseconds(),
(int)current.getNanoseconds(),
(ctm.tm_isdst==0) ? "false" : "true");
tt = time(&tt);
current.fromTime_t(tt);
printf("fromTime_t\ncurrent %lli %i milliSec %lli\n",
(long long)current.getSecondsPastEpoch(),
current.getNanoseconds(),
(int)current.getNanoseconds(),
(long long)current.getMilliseconds());
current.toTime_t(tt);
memcpy(&ctm,localtime(&tt),sizeof(struct tm));
@@ -59,7 +59,7 @@ void testTimeStampInternal()
"%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d %d isDst %s\n",
ctm.tm_year+1900,ctm.tm_mon + 1,ctm.tm_mday,
ctm.tm_hour,ctm.tm_min,ctm.tm_sec,
current.getNanoseconds(),
(int)current.getNanoseconds(),
(ctm.tm_isdst==0) ? "false" : "true");
TimeStamp right;
TimeStamp left;

View File

@@ -131,9 +131,9 @@ static void testTimeStamp()
"%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d %d nanoseconds isDst %s userTag %d\n",
ctm.tm_year+1900,ctm.tm_mon + 1,ctm.tm_mday,
ctm.tm_hour,ctm.tm_min,ctm.tm_sec,
timeStamp.getNanoseconds(),
(int)timeStamp.getNanoseconds(),
(ctm.tm_isdst==0) ? "false" : "true",
timeStamp.getUserTag());
(int)timeStamp.getUserTag());
}
timeStamp.put(0,0);
pvTimeStamp.set(timeStamp);
@@ -217,14 +217,14 @@ static void testEnumerated()
PVStringArray::const_svector choices = pvEnumerated.getChoices();
int32 numChoices = pvEnumerated.getNumberChoices();
if(debug) {
printf("index %d choice %s choices",index,choice.c_str());
printf("index %d choice %s choices",(int)index,choice.c_str());
for(int i=0; i<numChoices; i++ ) printf(" %s",choices[i].c_str());
printf("\n");
}
pvEnumerated.setIndex(2);
index = pvEnumerated.getIndex();
choice = pvEnumerated.getChoice();
if(debug) printf("index %d choice %s\n",index,choice.c_str());
if(debug) printf("index %d choice %s\n",(int)index,choice.c_str());
printf("testEnumerated PASSED\n");
}

View File

@@ -50,10 +50,10 @@ MAIN(testPVType)
int32 intInt;
intValue = 0x7fffffff;
intInt = intValue;
printf("int8 max %d",intInt);
printf("int8 max %d",(int)intInt);
intValue = 0x80000000;
intInt = intValue;
printf(" min %d\n",intInt);
printf(" min %d\n",(int)intInt);
int64 longInt = 0x7fffffff;
longInt <<= 32;