diff options
author | Grigoris Pavlakis <grigpavl@ece.auth.gr> | 2021-08-26 02:32:19 +0300 |
---|---|---|
committer | Grigoris Pavlakis <grigpavl@ece.auth.gr> | 2021-09-15 00:07:21 +0300 |
commit | abef2b7194d5dd7aac09e3817598dcce86ae2333 (patch) | |
tree | c9c50af6453fb6cc7da8a69c9a1a53dcf1706c06 /modules/mbedtls/crypto_mbedtls.cpp | |
parent | 0232a031772d929c00d7c8a7947b1b9894ce26fb (diff) |
Fix placement new on zero-sized region warning on GCC 11.1
On latest (11.1 as of this commit) GCC, the following warning is
continuously issued during build:
warning: placement new constructing an object of type
'SafeNumeric<unsigned int>' and size '4' in a region of type
'uint32_t*' {aka 'unsigned int*'} and size '0' [-Wplacement-new=]
This happens because on 98ceb60eb4 the new operator override used
was dropped and replaced with standard placement new. GCC sees the
subtraction from the pointer and complains as it thinks that the
SafeNumeric is placed outside an allocation, not knowing that the
address requested is already inside one.
After suggestions, the false positive is silenced, with no other
changes.
Diffstat (limited to 'modules/mbedtls/crypto_mbedtls.cpp')
0 files changed, 0 insertions, 0 deletions