Merge pull request #755 from simdjson/jkeiser/windows-deprecation-warning

Reenable deprecation warnings on Windows
This commit is contained in:
John Keiser 2020-04-22 14:18:28 -07:00 committed by GitHub
commit a5c9c31231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -51,8 +51,8 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
#
add_library(simdjson-flags INTERFACE)
if(MSVC)
target_compile_options(simdjson-flags INTERFACE /nologo)
target_compile_options(simdjson-flags INTERFACE /WX /W3 /wd4996 /wd4267 /wd4244)
target_compile_options(simdjson-flags INTERFACE /nologo /D_CRT_SECURE_NO_WARNINGS)
target_compile_options(simdjson-flags INTERFACE /WX /W3 /wd4267 /wd4244)
else()
target_compile_options(simdjson-flags INTERFACE -fPIC)
target_compile_options(simdjson-flags INTERFACE -Werror -Wall -Wextra -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self)

View File

@ -5,6 +5,10 @@
namespace simdjson {
// VS2017 reports deprecated warnings when you define a deprecated class's methods.
SIMDJSON_PUSH_DISABLE_WARNINGS
SIMDJSON_DISABLE_DEPRECATED_WARNING
// Because of template weirdness, the actual class definition is inline in the document class
WARN_UNUSED bool dom::parser::Iterator::is_ok() const {
@ -469,6 +473,8 @@ bool dom::parser::Iterator::relative_move_to(const char *pointer,
return found;
}
SIMDJSON_POP_DISABLE_WARNINGS
} // namespace simdjson
#endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H