File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ static inline char* duplicateStringValue(const char* value,
8686 size_t length) {
8787 // Avoid an integer overflow in the call to malloc below by limiting length
8888 // to a sane value.
89- if (length >= ( size_t ) Value::maxInt)
89+ if (length >= static_cast < size_t >( Value::maxInt) )
9090 length = Value::maxInt - 1 ;
9191
9292 char * newString = static_cast <char *>(malloc (length + 1 ));
@@ -108,7 +108,7 @@ static inline char* duplicateAndPrefixStringValue(
108108{
109109 // Avoid an integer overflow in the call to malloc below by limiting length
110110 // to a sane value.
111- JSON_ASSERT_MESSAGE (length <= ( unsigned ) Value::maxInt - sizeof (unsigned ) - 1U ,
111+ JSON_ASSERT_MESSAGE (length <= static_cast < unsigned >( Value::maxInt) - sizeof (unsigned ) - 1U ,
112112 " in Json::Value::duplicateAndPrefixStringValue(): "
113113 " length too big for prefixing" );
114114 unsigned actualLength = length + static_cast <unsigned >(sizeof (unsigned )) + 1U ;
You can’t perform that action at this time.
0 commit comments