From afe0460f92fb78e6d6cf8c8a30ced9bc5e2e57d3 Mon Sep 17 00:00:00 2001 From: Keith Moyer Date: Tue, 5 Jan 2021 23:23:27 -0800 Subject: [PATCH] Disable signed/unsigned comparison warnings. (#454) --- opencensus/copts.bzl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/opencensus/copts.bzl b/opencensus/copts.bzl index aa4fa30d..1947e1da 100644 --- a/opencensus/copts.bzl +++ b/opencensus/copts.bzl @@ -32,15 +32,16 @@ load( ) WERROR = ["-Werror=return-type", "-Werror=switch"] +WARN_FLAGS = ["-Wno-sign-compare"] DEFAULT_COPTS = select({ - "//opencensus:llvm_compiler": ABSL_LLVM_FLAGS + WERROR, + "//opencensus:llvm_compiler": ABSL_LLVM_FLAGS + WERROR + WARN_FLAGS, "//opencensus:windows": ABSL_MSVC_FLAGS, - "//conditions:default": ABSL_GCC_FLAGS + WERROR, + "//conditions:default": ABSL_GCC_FLAGS + WERROR + WARN_FLAGS, }) TEST_COPTS = DEFAULT_COPTS + select({ - "//opencensus:llvm_compiler": ABSL_LLVM_TEST_FLAGS + WERROR, + "//opencensus:llvm_compiler": ABSL_LLVM_TEST_FLAGS + WERROR + WARN_FLAGS, "//opencensus:windows": ABSL_MSVC_TEST_FLAGS, - "//conditions:default": ABSL_GCC_TEST_FLAGS + WERROR, + "//conditions:default": ABSL_GCC_TEST_FLAGS + WERROR + WARN_FLAGS, })