Added various Casts to stop compiler warnings.
This commit is contained in:
@@ -128,6 +128,11 @@
|
||||
* AR_CHAN_DESC *arCF_mallocCHAN_DESC() void arCF_freeCHAN_DESC(pChanDesc)
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/* Forward declarations */
|
||||
long arCFChanReadTs();
|
||||
long arCFReadMIBuffers();
|
||||
|
||||
AR_CHAN_DESC *
|
||||
arCF_mallocCHAN_DESC()
|
||||
{
|
||||
|
||||
@@ -512,7 +512,7 @@ static double random()
|
||||
|
||||
/* random number */
|
||||
seed = (seed * multy) + addy;
|
||||
randy = seed / 65535.0;
|
||||
randy = (float) seed / 65535.0;
|
||||
|
||||
/* between 0 - 1 */
|
||||
return(randy);
|
||||
|
||||
@@ -512,7 +512,7 @@ static double random()
|
||||
|
||||
/* random number */
|
||||
seed = (seed * multy) + addy;
|
||||
randy = seed / 65535.0;
|
||||
randy = (float) seed / 65535.0;
|
||||
|
||||
/* between 0 - 1 */
|
||||
return(randy);
|
||||
|
||||
@@ -243,7 +243,8 @@ va_dcl
|
||||
if(pFileName && errVerbose){
|
||||
#ifdef vxWorks
|
||||
if(errToLogMsg) {
|
||||
logMsg("filename=\"%s\" line number=%d\n", pFileName, lineno);
|
||||
logMsg("filename=\"%s\" line number=%d\n", pFileName, lineno,
|
||||
NULL, NULL, NULL, NULL);
|
||||
}
|
||||
else{
|
||||
printf("filename=\"%s\" line number=%d\n", pFileName, lineno);
|
||||
@@ -273,7 +274,8 @@ va_dcl
|
||||
}
|
||||
else{
|
||||
#ifdef vxWorks
|
||||
logMsg("%s: calloc error\n", __FILE__);
|
||||
logMsg("%s: calloc error\n", __FILE__,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
#else
|
||||
printf("%s: calloc error\n", __FILE__);
|
||||
#endif
|
||||
@@ -426,7 +428,7 @@ char *name;
|
||||
***************************************************************/
|
||||
#ifndef vxWorks
|
||||
#ifdef __STDC__
|
||||
int UnixSymFind(long status, char *pname, long *pvalue);
|
||||
int UnixSymFind(long status, char *pname, long *pvalue)
|
||||
#else
|
||||
int UnixSymFind(status, pname, pvalue)
|
||||
long status;
|
||||
|
||||
@@ -243,7 +243,8 @@ va_dcl
|
||||
if(pFileName && errVerbose){
|
||||
#ifdef vxWorks
|
||||
if(errToLogMsg) {
|
||||
logMsg("filename=\"%s\" line number=%d\n", pFileName, lineno);
|
||||
logMsg("filename=\"%s\" line number=%d\n", pFileName, lineno,
|
||||
NULL, NULL, NULL, NULL);
|
||||
}
|
||||
else{
|
||||
printf("filename=\"%s\" line number=%d\n", pFileName, lineno);
|
||||
@@ -273,7 +274,8 @@ va_dcl
|
||||
}
|
||||
else{
|
||||
#ifdef vxWorks
|
||||
logMsg("%s: calloc error\n", __FILE__);
|
||||
logMsg("%s: calloc error\n", __FILE__,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
#else
|
||||
printf("%s: calloc error\n", __FILE__);
|
||||
#endif
|
||||
@@ -426,7 +428,7 @@ char *name;
|
||||
***************************************************************/
|
||||
#ifndef vxWorks
|
||||
#ifdef __STDC__
|
||||
int UnixSymFind(long status, char *pname, long *pvalue);
|
||||
int UnixSymFind(long status, char *pname, long *pvalue)
|
||||
#else
|
||||
int UnixSymFind(status, pname, pvalue)
|
||||
long status;
|
||||
|
||||
+10
-10
@@ -1953,7 +1953,7 @@ int ignorePartial; /* I 0,1 to store,ignore partial samples */
|
||||
pSChan->maxDataVal = pSChan->minDataVal = (double)*pSrc;
|
||||
pSChan->minMaxNeedInit = 0;
|
||||
}
|
||||
for (el=0; el<pSChan->elCount; el++) {
|
||||
for (el=0; el<(int) pSChan->elCount; el++) {
|
||||
if (useVal) {
|
||||
if ((double)*pSrc > pSChan->maxDataVal)
|
||||
pSChan->maxDataVal = (double)*pSrc;
|
||||
@@ -1976,7 +1976,7 @@ int ignorePartial; /* I 0,1 to store,ignore partial samples */
|
||||
pSChan->maxDataVal = pSChan->minDataVal = dbl;
|
||||
pSChan->minMaxNeedInit = 0;
|
||||
}
|
||||
for (el=0; el<pSChan->elCount; el++) {
|
||||
for (el=0; el<(int) pSChan->elCount; el++) {
|
||||
if (useVal) {
|
||||
if (pSChan->isRVAL)
|
||||
dbl = (double)(*(unsigned short *)pSrc);
|
||||
@@ -1998,7 +1998,7 @@ int ignorePartial; /* I 0,1 to store,ignore partial samples */
|
||||
pSChan->maxDataVal = pSChan->minDataVal = *pSrc;
|
||||
pSChan->minMaxNeedInit = 0;
|
||||
}
|
||||
for (el=0; el<pSChan->elCount; el++) {
|
||||
for (el=0; el<(int) pSChan->elCount; el++) {
|
||||
if (useVal) {
|
||||
if (*pSrc > pSChan->maxDataVal)
|
||||
pSChan->maxDataVal = *pSrc;
|
||||
@@ -2021,7 +2021,7 @@ int ignorePartial; /* I 0,1 to store,ignore partial samples */
|
||||
pSChan->maxDataVal = pSChan->minDataVal = (double)*pSrc;
|
||||
pSChan->minMaxNeedInit = 0;
|
||||
}
|
||||
for (el=0; el<pSChan->elCount; el++) {
|
||||
for (el=0; el<(int) pSChan->elCount; el++) {
|
||||
if (useVal) {
|
||||
if (pSChan->isRVAL)
|
||||
dbl = (double)(*(unsigned long *)pSrc);
|
||||
@@ -2040,7 +2040,7 @@ int ignorePartial; /* I 0,1 to store,ignore partial samples */
|
||||
pSrc = pSChan->pInBuf[i]->tstrval.value;
|
||||
pDest = ((char *)pSChan->pData) +
|
||||
sub * db_strval_dim * pSChan->elCount;
|
||||
for (el=0; el<pSChan->elCount; el++) {
|
||||
for (el=0; el<(int) pSChan->elCount; el++) {
|
||||
strcpy(pDest, pSrc);
|
||||
pDest += db_strval_dim;
|
||||
pSrc += db_strval_dim;
|
||||
@@ -2055,7 +2055,7 @@ int ignorePartial; /* I 0,1 to store,ignore partial samples */
|
||||
pSChan->maxDataVal = pSChan->minDataVal = (double)*pSrc;
|
||||
pSChan->minMaxNeedInit = 0;
|
||||
}
|
||||
for (el=0; el<pSChan->elCount; el++) {
|
||||
for (el=0; el<(int) pSChan->elCount; el++) {
|
||||
if (useVal) {
|
||||
if ((double)*pSrc > pSChan->maxDataVal)
|
||||
pSChan->maxDataVal = (double)*pSrc;
|
||||
@@ -2073,7 +2073,7 @@ int ignorePartial; /* I 0,1 to store,ignore partial samples */
|
||||
pSChan->maxDataVal = pSChan->minDataVal = (double)*pSrc;
|
||||
pSChan->minMaxNeedInit = 0;
|
||||
}
|
||||
for (el=0; el<pSChan->elCount; el++) {
|
||||
for (el=0; el<(int) pSChan->elCount; el++) {
|
||||
if (useVal) {
|
||||
if ((double)*pSrc > pSChan->maxDataVal)
|
||||
pSChan->maxDataVal = (double)*pSrc;
|
||||
@@ -2650,7 +2650,7 @@ int samp; /* I sample number in synchronous set */
|
||||
for (pSChan=pSspec->pChanHead; pSChan!=NULL; pSChan=pSChan->pNext) {
|
||||
if (pSChan->dataChan && pSChan->elCount > 1) {
|
||||
(void)fprintf(out, "%s", pSChan->name);
|
||||
for (i=0; i<pSChan->elCount; i++) {
|
||||
for (i=0; i<(int) pSChan->elCount; i++) {
|
||||
if (i%nCol == 0)
|
||||
(void)fprintf(out, "\n%5d", i);
|
||||
(void)fputc(' ', out);
|
||||
@@ -2743,7 +2743,7 @@ int sampNum; /* I sample number in sync set */
|
||||
if (special == NULL) {
|
||||
if (flags&SHOW_AR) {
|
||||
(void)fprintf(out, "%d", pSChan->elCount);
|
||||
for (i=0; i<pSChan->elCount; i++) {
|
||||
for (i=0; i<(int) pSChan->elCount; i++) {
|
||||
(void)fputc(sep, out);
|
||||
sydSamplePrintVal(out, pSChan, sampNum, i, flags, colWidth);
|
||||
}
|
||||
@@ -3808,7 +3808,7 @@ SYD_SPEC *pSspec; /* I pointer to synchronous set spec */
|
||||
if (lngVal < pTest->lngVal) change = -1;
|
||||
else if (lngVal > pTest->lngVal) change = 1;
|
||||
}
|
||||
#define COND_IS(ty) pTest->cond == SYD_TSTC_/**/ty
|
||||
#define COND_IS(ty) pTest->cond == SYD_TSTC_##ty
|
||||
if (change == 0) {
|
||||
if (COND_IS(EQ) || COND_IS(LE) || COND_IS(GE))
|
||||
return 1;
|
||||
|
||||
@@ -710,7 +710,7 @@ chtype type;
|
||||
bufStat = SYD_B_MISSING;
|
||||
break;
|
||||
}
|
||||
else if (i < pSChan->elCount)
|
||||
else if (i < (int) pSChan->elCount)
|
||||
*pFl++ = val;
|
||||
}
|
||||
}
|
||||
@@ -723,7 +723,7 @@ chtype type;
|
||||
bufStat = SYD_B_MISSING;
|
||||
break;
|
||||
}
|
||||
else if (i < pSChan->elCount)
|
||||
else if (i < (int) pSChan->elCount)
|
||||
*pSh++ = val;
|
||||
}
|
||||
}
|
||||
@@ -736,7 +736,7 @@ chtype type;
|
||||
bufStat = SYD_B_MISSING;
|
||||
break;
|
||||
}
|
||||
else if (i < pSChan->elCount)
|
||||
else if (i < (int) pSChan->elCount)
|
||||
*pDbl++ = val;
|
||||
}
|
||||
}
|
||||
@@ -749,7 +749,7 @@ chtype type;
|
||||
bufStat = SYD_B_MISSING;
|
||||
break;
|
||||
}
|
||||
else if (i < pSChan->elCount)
|
||||
else if (i < (int) pSChan->elCount)
|
||||
*pL++ = val;
|
||||
}
|
||||
}
|
||||
@@ -766,7 +766,7 @@ chtype type;
|
||||
assert(nChar > 0 && nChar < db_strval_dim);
|
||||
if (fgets(val, nChar, ssFile) == NULL)
|
||||
assertAlways(0);
|
||||
if (i < pSChan->elCount) {
|
||||
if (i < (int) pSChan->elCount) {
|
||||
strcpy(pC, val);
|
||||
pC += db_strval_dim;
|
||||
}
|
||||
@@ -781,7 +781,7 @@ chtype type;
|
||||
bufStat = SYD_B_MISSING;
|
||||
break;
|
||||
}
|
||||
else if (i < pSChan->elCount)
|
||||
else if (i < (int) pSChan->elCount)
|
||||
*pC++ = val;
|
||||
}
|
||||
}
|
||||
@@ -809,7 +809,7 @@ chtype type;
|
||||
iState++;
|
||||
assert(iState < db_state_dim);
|
||||
}
|
||||
if (i < pSChan->elCount)
|
||||
if (i < (int) pSChan->elCount)
|
||||
*pSh++ = iState;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user