rapidjson
rapidjson copied to clipboard
Fix -Werror=free-nonheap-object warning as error and add support for RVCT 4.1 ARM compiler
When building the perftest, schematest.cpp was yielding an error in relation to freeing a stack object. This change fixes that by explicitly passing in nullptr to CrtAllocator::Free if we don't own the memory.
Fixes: #2267
std::free(nullptr)
is also safe and does not invoke undefined behavior as per the standard.
@miloyip, @tencent-adm, this patch should be ready to go
Added another commit to the PR to support the RVCT 4.1 ARM compiler with some preprocessor checks
@miloyip, @tencent-adm, this is ready to go