Enable more C++ warnings (#143099)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/143099
Approved by: https://github.com/albanD
This commit is contained in:
cyy 2024-12-17 02:03:39 +00:00 committed by PyTorch MergeBot
parent af190479c8
commit 201cb8834f
3 changed files with 0 additions and 8 deletions

View File

@ -1188,7 +1188,6 @@ if(APPLE)
append_cxx_flag_if_supported("-Wno-unguarded-availability-new"
CMAKE_OBJCXX_FLAGS)
endif()
append_cxx_flag_if_supported("-Wno-unused-private-field" CMAKE_CXX_FLAGS)
append_cxx_flag_if_supported("-Wno-missing-braces" CMAKE_CXX_FLAGS)
endif()

View File

@ -785,11 +785,6 @@ if(HAVE_SOVERSION)
endif()
torch_compile_options(torch_cpu) # see cmake/public/utils.cmake
# Ignore Wdeprecated-XXX errors from third-party libraries
if(NOT MSVC)
set_source_files_properties(${PROJECT_SOURCE_DIR}/torch/csrc/distributed/c10d/socket.cpp PROPERTIES COMPILE_OPTIONS "-Wno-error=deprecated")
endif()
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND NOT USE_IOS AND NOT USE_COREML_DELEGATE)
target_compile_options_if_supported(torch_cpu "-Wmissing-prototypes")
target_compile_options_if_supported(torch_cpu "-Werror=missing-prototypes")

View File

@ -29,9 +29,7 @@
#include <unistd.h>
#endif
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated")
#include <fmt/chrono.h>
C10_DIAGNOSTIC_POP()
#include <fmt/format.h>
#include <fmt/ranges.h>