From a841869405dd70045b280f9210d03c005be7ef74 Mon Sep 17 00:00:00 2001 From: Gennaro Prota Date: Fri, 24 Oct 2025 10:54:02 +0200 Subject: [PATCH] Remove a use of std::strcpy() to avoid a C4996 warning from MSVC --- test/static_string.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/static_string.cpp b/test/static_string.cpp index b79d0a7..6bbaee9 100644 --- a/test/static_string.cpp +++ b/test/static_string.cpp @@ -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; } );