mirror of
https://github.com/open62541/open62541.git
synced 2025-06-03 04:00:21 +00:00
fix(core): Add an assertion to help clang-analyzer in decodeJSONVariant
This commit is contained in:
parent
b2d4fdb2d7
commit
5189490170
@ -1877,6 +1877,9 @@ decodeJSONVariant(ParseCtx *ctx, UA_Variant *dst) {
|
|||||||
ctx->index = dimIndex;
|
ctx->index = dimIndex;
|
||||||
res |= Array_decodeJson(ctx, (void**)&dst->arrayDimensions, &UA_TYPES[UA_TYPES_UINT32]);
|
res |= Array_decodeJson(ctx, (void**)&dst->arrayDimensions, &UA_TYPES[UA_TYPES_UINT32]);
|
||||||
|
|
||||||
|
/* Help clang-analyzer */
|
||||||
|
UA_assert(dst->arrayDimensionsSize == 0 || dst->arrayDimensions);
|
||||||
|
|
||||||
/* Validate the dimensions */
|
/* Validate the dimensions */
|
||||||
size_t total = 1;
|
size_t total = 1;
|
||||||
for(size_t i = 0; i < dst->arrayDimensionsSize; i++)
|
for(size_t i = 0; i < dst->arrayDimensionsSize; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user