made code proper to avoid warning/fixed some small potential bugs

This commit is contained in:
zolliker
2005-03-04 12:53:07 +00:00
parent 52e8c78aa9
commit 9a94b6dca7
29 changed files with 71 additions and 46 deletions

9
scan.c
View File

@ -335,7 +335,7 @@ static void ConfigureScanDict(pStringDict dict)
pCount = (pCountEntry)pData;
if(pCount != NULL)
{
fprintf(fd,"%s storecounts %d %f %d %d %d %d %d %d %d %d %d %d\n",
fprintf(fd,"%s storecounts %ld %f %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n",
self->objectName,
pCount->lCount,
pCount->fTime,
@ -1326,7 +1326,7 @@ int isScanVarSoft(pScanData self){
strcpy(pPtr,"scan.Counts= {");
for(i = 0; i < self->iNP; i++)
{
sprintf(pItem,"%d ",lData[i]);
sprintf(pItem,"%ld ",lData[i]);
strcat(pPtr,pItem);
}
strcat(pPtr,"}");
@ -1386,7 +1386,7 @@ int isScanVarSoft(pScanData self){
} else {
lVal = -9999.99;
}
snprintf(pBueffel,255,"%s.scanpoint = {%d %f %d}",
snprintf(pBueffel,255,"%s.scanpoint = {%d %f %ld}",
self->objectName,i,fVal,lVal);
SCWrite(pCon,pBueffel,eValue);
}
@ -2374,5 +2374,6 @@ static int InterpretScanFunctions(pScanData self, SConnection *pCon,
argv[1], argv[0]);
SCWrite(pCon,pBueffel,eError);
return 0;
}
}
return 0;
}