summaryrefslogtreecommitdiff
path: root/Templates/TestDriver.cxx.in
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-05-30 09:39:28 +0200
committerBrad King <brad.king@kitware.com>2018-05-30 09:45:57 -0400
commit3af0438b4bccc599792f61a9f4be81b4bb36c3e3 (patch)
treec7524948324960f6526a14bceea900bada618dd0 /Templates/TestDriver.cxx.in
parent519427e32c1f914b2a4184553c18fccd4614209d (diff)
downloadcmake-3af0438b4bccc599792f61a9f4be81b4bb36c3e3.tar.gz
TestDriver: Replace strncpy with strcpy
GCC 8.1.0 now gives an error if `strncpy` is called with a bound depending on the length of the source argument. Replace `strncpy` with `strcpy` as the length is known a priori. Fixes: #18038
Diffstat (limited to 'Templates/TestDriver.cxx.in')
-rw-r--r--Templates/TestDriver.cxx.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in
index ff3c869e5c..ac531c051b 100644
--- a/Templates/TestDriver.cxx.in
+++ b/Templates/TestDriver.cxx.in
@@ -48,7 +48,7 @@ static char* lowercase(const char* string)
if (new_string == NULL) { /* NOLINT */
return NULL; /* NOLINT */
}
- strncpy(new_string, string, stringSize);
+ strcpy(new_string, string);
for (p = new_string; *p != 0; ++p) {
*p = CM_CAST(char, tolower(*p));
}