Removing Klocwork issues from schema.h
Removing Klocwork static code analysis critical issues: line 358: 'this->notValidatorIndex_' might not be initialized in this constructor. line :412 Pointer 'schemaDocument' checked for NULL at line 412 may be passed to function and may be dereferenced there by passing argument this to function 'CreateSchema' at line 419. Also there are 7 similar errors on lines 467 479 511 523 533 538 549.
This commit is contained in:
parent
2a0bc6062b
commit
b217cc640c
@ -355,6 +355,7 @@ public:
|
|||||||
not_(),
|
not_(),
|
||||||
type_((1 << kTotalSchemaType) - 1), // typeless
|
type_((1 << kTotalSchemaType) - 1), // typeless
|
||||||
validatorCount_(),
|
validatorCount_(),
|
||||||
|
notValidatorIndex_(),
|
||||||
properties_(),
|
properties_(),
|
||||||
additionalPropertiesSchema_(),
|
additionalPropertiesSchema_(),
|
||||||
patternProperties_(),
|
patternProperties_(),
|
||||||
@ -409,11 +410,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (schemaDocument) {
|
|
||||||
AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document);
|
AssignIfExist(allOf_, *schemaDocument, p, value, GetAllOfString(), document);
|
||||||
AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document);
|
AssignIfExist(anyOf_, *schemaDocument, p, value, GetAnyOfString(), document);
|
||||||
AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document);
|
AssignIfExist(oneOf_, *schemaDocument, p, value, GetOneOfString(), document);
|
||||||
}
|
|
||||||
|
|
||||||
if (const ValueType* v = GetMember(value, GetNotString())) {
|
if (const ValueType* v = GetMember(value, GetNotString())) {
|
||||||
schemaDocument->CreateSchema(¬_, p.Append(GetNotString(), allocator_), *v, document);
|
schemaDocument->CreateSchema(¬_, p.Append(GetNotString(), allocator_), *v, document);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user