Fixes GCC complaining about a non error
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2022-05-14 12:02:54 +02:00
parent 30cb3c0d5e
commit dad30a05f0
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 3 additions and 0 deletions

View File

@ -22,7 +22,10 @@ namespace ArbUt {
public:
__ConstStringCharHolder(const char* non_null value, size_t length) : _value(new char[length + 1]) {
EnsureNotNull(value);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
strncpy(_value, value, length);
#pragma GCC diagnostic pop
_value[length] = 0;
}
~__ConstStringCharHolder() noexcept { delete[] _value; }