fix some type conversion warning on Windows

This commit is contained in:
2020-09-29 16:34:08 +02:00
parent 9273476135
commit 4edff374d0
6 changed files with 15 additions and 15 deletions

View File

@ -171,10 +171,10 @@ static long writeData(dbCommon *record, format_t *format)
break; break;
#ifdef DBR_INT64 #ifdef DBR_INT64
case DBF_INT64: case DBF_INT64:
dval = ((epicsInt64 *)aai->bptr)[nowd]; dval = (double)((epicsInt64 *)aai->bptr)[nowd];
break; break;
case DBF_UINT64: case DBF_UINT64:
dval = ((epicsUInt64 *)aai->bptr)[nowd]; dval = (double)((epicsUInt64 *)aai->bptr)[nowd];
break; break;
#endif #endif
case DBF_LONG: case DBF_LONG:
@ -214,10 +214,10 @@ static long writeData(dbCommon *record, format_t *format)
{ {
#ifdef DBR_INT64 #ifdef DBR_INT64
case DBF_INT64: case DBF_INT64:
lval = ((epicsInt64 *)aai->bptr)[nowd]; lval = (long)((epicsInt64 *)aai->bptr)[nowd];
break; break;
case DBF_UINT64: case DBF_UINT64:
lval = ((epicsUInt64 *)aai->bptr)[nowd]; lval = (long)((epicsUInt64 *)aai->bptr)[nowd];
break; break;
#endif #endif
case DBF_LONG: case DBF_LONG:

View File

@ -200,10 +200,10 @@ static long writeData(dbCommon *record, format_t *format)
break; break;
#ifdef DBR_INT64 #ifdef DBR_INT64
case DBF_INT64: case DBF_INT64:
dval = ((epicsInt64 *)aao->bptr)[nowd]; dval = (double)((epicsInt64 *)aao->bptr)[nowd];
break; break;
case DBF_UINT64: case DBF_UINT64:
dval = ((epicsUInt64 *)aao->bptr)[nowd]; dval = (double)((epicsUInt64 *)aao->bptr)[nowd];
break; break;
#endif #endif
case DBF_LONG: case DBF_LONG:
@ -243,10 +243,10 @@ static long writeData(dbCommon *record, format_t *format)
{ {
#ifdef DBR_INT64 #ifdef DBR_INT64
case DBF_INT64: case DBF_INT64:
lval = ((epicsInt64 *)aao->bptr)[nowd]; lval = (long)((epicsInt64 *)aao->bptr)[nowd];
break; break;
case DBF_UINT64: case DBF_UINT64:
lval = ((epicsUInt64 *)aao->bptr)[nowd]; lval = (long)((epicsUInt64 *)aao->bptr)[nowd];
break; break;
#endif #endif
case DBF_LONG: case DBF_LONG:

View File

@ -73,7 +73,7 @@ static long readData(dbCommon *record, format_t *format)
if (record->pact) return DO_NOT_CONVERT; if (record->pact) return DO_NOT_CONVERT;
/* In @init handler, no processing, enforce monitor updates. */ /* In @init handler, no processing, enforce monitor updates. */
ao->omod = ao->oval != val; ao->omod = ao->oval != val;
ao->orbv = ao->oval = val; ao->orbv = (epicsInt32)(ao->oval = val);
monitor_mask = recGblResetAlarms(record); monitor_mask = recGblResetAlarms(record);
if (!(fabs(ao->mlst - val) <= ao->mdel)) if (!(fabs(ao->mlst - val) <= ao->mdel))
{ {

View File

@ -37,7 +37,7 @@ static long readData(dbCommon *record, format_t *format)
{ {
lsi->val[length] = 0; lsi->val[length] = 0;
} }
lsi->len = length; lsi->len = (epicsUInt32)length;
return OK; return OK;
} }

View File

@ -39,7 +39,7 @@ static long readData(dbCommon *record, format_t *format)
{ {
lso->val[length] = 0; lso->val[length] = 0;
} }
lso->len = length; lso->len = (epicsUInt32)length;
if (record->pact) return OK; if (record->pact) return OK;
/* In @init handler, no processing, enforce monitor updates. */ /* In @init handler, no processing, enforce monitor updates. */
monitor_mask = recGblResetAlarms(record); monitor_mask = recGblResetAlarms(record);

View File

@ -172,10 +172,10 @@ static long writeData(dbCommon *record, format_t *format)
break; break;
#ifdef DBR_INT64 #ifdef DBR_INT64
case DBF_INT64: case DBF_INT64:
dval = ((epicsInt64 *)wf->bptr)[nowd]; dval = (double)((epicsInt64 *)wf->bptr)[nowd];
break; break;
case DBF_UINT64: case DBF_UINT64:
dval = ((epicsUInt64 *)wf->bptr)[nowd]; dval = (double)((epicsUInt64 *)wf->bptr)[nowd];
break; break;
#endif #endif
case DBF_LONG: case DBF_LONG:
@ -215,10 +215,10 @@ static long writeData(dbCommon *record, format_t *format)
{ {
#ifdef DBR_INT64 #ifdef DBR_INT64
case DBF_INT64: case DBF_INT64:
lval = ((epicsInt64 *)wf->bptr)[nowd]; lval = (long)((epicsInt64 *)wf->bptr)[nowd];
break; break;
case DBF_UINT64: case DBF_UINT64:
lval = ((epicsUInt64 *)wf->bptr)[nowd]; lval = (long)((epicsUInt64 *)wf->bptr)[nowd];
break; break;
#endif #endif
case DBF_LONG: case DBF_LONG: