Remove a use of std::strcpy() to avoid a C4996 warning from MSVC

This commit is contained in:
Gennaro Prota
2025-10-24 10:54:02 +02:00
parent 3613e9578d
commit a841869405

View File

@@ -7430,7 +7430,12 @@ testResizeAndOverwrite()
5,
[](char* buf, std::size_t) -> std::size_t
{
std::strcpy(buf, "Hello");
// Don't use std::strcpy() to avoid a MSVC C4996 warning.
buf[0] = 'H';
buf[1] = 'e';
buf[2] = 'l';
buf[3] = 'l';
buf[4] = 'o';
return 5;
}
);