https://git.reactos.org/?p=reactos.git;a=commitdiff;h=85d7a38c41327fdd40f26…
commit 85d7a38c41327fdd40f26145aa6db5a3cd320c5d
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Apr 28 16:22:34 2019 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon May 27 13:54:07 2019 +0200
[TELNET] disable restrict warnings
Fixes GCC 8 warning:
base/applications/network/telnet/src/tnmain.cpp:190:13: error: 'char*
strcpy(char*, const char*)' accessing 1 byte at offsets [0, 2147483647] and [0,
2147483647] may overlap 1 byte at offset 0 [-Werror=restrict]
strcpy(&buf[cursor],&buf[cursor+1]);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
base/applications/network/telnet/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/base/applications/network/telnet/CMakeLists.txt
b/base/applications/network/telnet/CMakeLists.txt
index dedb110f71..b0916c0a24 100644
--- a/base/applications/network/telnet/CMakeLists.txt
+++ b/base/applications/network/telnet/CMakeLists.txt
@@ -3,6 +3,10 @@ set_cpp(WITH_EXCEPTIONS WITH_STL)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
+if(NOT MSVC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
+ add_compile_flags("-Wno-restrict")
+endif()
+
list(APPEND SOURCE
src/ansiprsr.cpp
src/keytrans.cpp