From a15160cd4550bd19b53c6cfc6de451a2bc8c24cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 31 Mar 2019 10:30:45 +0200 Subject: [PATCH] [FREELDR] Prevent a warning in Xbox memory initialization --- boot/freeldr/freeldr/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt index 74a9b444c24..10307104799 100644 --- a/boot/freeldr/freeldr/CMakeLists.txt +++ b/boot/freeldr/freeldr/CMakeLists.txt @@ -195,6 +195,10 @@ if(USE_CLANG_CL) # We need to reduce the binary size add_target_compile_flags(freeldr_common "/Os") endif() +if(NOT MSVC AND ARCH STREQUAL "i386") + # Prevent a warning when doing a memcmp with address 0 + set_source_files_properties(arch/i386/xboxmem.c PROPERTIES COMPILE_FLAGS "-Wno-nonnull") +endif() set(PCH_SOURCE ${FREELDR_BOOTLIB_SOURCE}