summaryrefslogtreecommitdiffstats
path: root/Templates/TestDriver.cxx.in
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-05-30 07:39:28 (GMT)
committerBrad King <brad.king@kitware.com>2018-05-30 13:45:57 (GMT)
commit3af0438b4bccc599792f61a9f4be81b4bb36c3e3 (patch)
treec7524948324960f6526a14bceea900bada618dd0 /Templates/TestDriver.cxx.in
parent519427e32c1f914b2a4184553c18fccd4614209d (diff)
downloadCMake-3af0438b4bccc599792f61a9f4be81b4bb36c3e3.zip
CMake-3af0438b4bccc599792f61a9f4be81b4bb36c3e3.tar.gz
CMake-3af0438b4bccc599792f61a9f4be81b4bb36c3e3.tar.bz2
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 ff3c869..ac531c0 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));
}