enable -Werror=sign-compare in our Bazel build (#98671)

enable -Werror=sign-compare in our Bazel build

Summary:
This is already turned on for CMake, let's see what breaks.

Test Plan: Rely on CI.

Reviewers: sahanp

Subscribers:

Tasks:

Tags:

Pull Request resolved: https://github.com/pytorch/pytorch/pull/98671
Approved by: https://github.com/kit1980
This commit is contained in:
mikey dagitses
2023-04-26 23:23:24 +00:00
committed by PyTorch MergeBot
parent 6789342a56
commit fab2e3971f

View File

@ -69,10 +69,6 @@ build --per_file_copt='^//.*\.(cpp|cc)$'@-Werror=all
# The following warnings come from -Wall. We downgrade them from error
# to warnings here.
#
# sign-compare has a tremendous amount of violations in the
# codebase. It will be a lot of work to fix them, just disable it for
# now.
build --per_file_copt='^//.*\.(cpp|cc)$'@-Wno-sign-compare
# We intentionally use #pragma unroll, which is compiler specific.
build --per_file_copt='^//.*\.(cpp|cc)$'@-Wno-error=unknown-pragmas