mirror of
https://github.com/open62541/open62541.git
synced 2025-06-03 04:00:21 +00:00
fix(pubsub): Make casting explicit to avoid MSVC warnings
This commit is contained in:
parent
5364fdd893
commit
6f2aeaf040
@ -664,7 +664,7 @@ UA_NetworkMessage_decodeHeaders(PubSubDecodeCtx *ctx,
|
|||||||
} else {
|
} else {
|
||||||
/* If no PayloadHeader is defined, then assume the EncodingOptions
|
/* If no PayloadHeader is defined, then assume the EncodingOptions
|
||||||
* reflect the DataSetMessages */
|
* reflect the DataSetMessages */
|
||||||
nm->messageCount = ctx->eo.metaDataSize;
|
nm->messageCount = (UA_Byte)ctx->eo.metaDataSize;
|
||||||
for(size_t i = 0; i < nm->messageCount; i++)
|
for(size_t i = 0; i < nm->messageCount; i++)
|
||||||
nm->dataSetWriterIds[i] = ctx->eo.metaData[i].dataSetWriterId;
|
nm->dataSetWriterIds[i] = ctx->eo.metaData[i].dataSetWriterId;
|
||||||
|
|
||||||
@ -1316,7 +1316,7 @@ UA_DataSetMessage_keyFrame_raw_encodeBinary(PubSubEncodeCtx *ctx,
|
|||||||
UA_UInt32 *arrayDims = v->arrayDimensions;
|
UA_UInt32 *arrayDims = v->arrayDimensions;
|
||||||
size_t arrayDimsSize = v->arrayDimensionsSize;
|
size_t arrayDimsSize = v->arrayDimensionsSize;
|
||||||
if(!arrayDims) {
|
if(!arrayDims) {
|
||||||
tmpDim = v->arrayLength;
|
tmpDim = (UA_UInt32)v->arrayLength;
|
||||||
arrayDims = &tmpDim;
|
arrayDims = &tmpDim;
|
||||||
arrayDimsSize = 1;
|
arrayDimsSize = 1;
|
||||||
}
|
}
|
||||||
@ -1526,7 +1526,7 @@ UA_DataSetMessage_keyFrame_decodeBinary(PubSubDecodeCtx *ctx,
|
|||||||
} else {
|
} else {
|
||||||
if(!emd)
|
if(!emd)
|
||||||
return UA_STATUSCODE_BADDECODINGERROR;
|
return UA_STATUSCODE_BADDECODINGERROR;
|
||||||
dsm->fieldCount = emd->fieldsSize;
|
dsm->fieldCount = (UA_UInt16)emd->fieldsSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dsm->fieldCount == 0)
|
if(dsm->fieldCount == 0)
|
||||||
@ -1669,7 +1669,7 @@ UA_DataSetMessage_raw_calcSizeBinary(const UA_Variant *v, const UA_FieldMetaData
|
|||||||
UA_UInt32 *arrayDims = v->arrayDimensions;
|
UA_UInt32 *arrayDims = v->arrayDimensions;
|
||||||
size_t arrayDimsSize = v->arrayDimensionsSize;
|
size_t arrayDimsSize = v->arrayDimensionsSize;
|
||||||
if(!arrayDims) {
|
if(!arrayDims) {
|
||||||
tmpDim = v->arrayLength;
|
tmpDim = (UA_UInt32)v->arrayLength;
|
||||||
arrayDims = &tmpDim;
|
arrayDims = &tmpDim;
|
||||||
arrayDimsSize = 1;
|
arrayDimsSize = 1;
|
||||||
}
|
}
|
||||||
|
@ -498,7 +498,7 @@ NetworkMessage_decodeJsonInternal(PubSubDecodeJsonCtx *ctx,
|
|||||||
UA_calloc(messageCount, sizeof(UA_DataSetMessage));
|
UA_calloc(messageCount, sizeof(UA_DataSetMessage));
|
||||||
if(!dst->payload.dataSetMessages)
|
if(!dst->payload.dataSetMessages)
|
||||||
return UA_STATUSCODE_BADOUTOFMEMORY;
|
return UA_STATUSCODE_BADOUTOFMEMORY;
|
||||||
dst->messageCount = messageCount;
|
dst->messageCount = (UA_Byte)messageCount;
|
||||||
|
|
||||||
/* Network Message */
|
/* Network Message */
|
||||||
UA_String messageType;
|
UA_String messageType;
|
||||||
|
Loading…
Reference in New Issue
Block a user