Fixes GCC complaining about a non error
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
30cb3c0d5e
commit
dad30a05f0
|
@ -22,7 +22,10 @@ namespace ArbUt {
|
||||||
public:
|
public:
|
||||||
__ConstStringCharHolder(const char* non_null value, size_t length) : _value(new char[length + 1]) {
|
__ConstStringCharHolder(const char* non_null value, size_t length) : _value(new char[length + 1]) {
|
||||||
EnsureNotNull(value);
|
EnsureNotNull(value);
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||||
strncpy(_value, value, length);
|
strncpy(_value, value, length);
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
_value[length] = 0;
|
_value[length] = 0;
|
||||||
}
|
}
|
||||||
~__ConstStringCharHolder() noexcept { delete[] _value; }
|
~__ConstStringCharHolder() noexcept { delete[] _value; }
|
||||||
|
|
Loading…
Reference in New Issue