Commit 5b911be8 authored by Nico Weber's avatar Nico Weber

Enable -Wextra-semi in non-cros non-chromecast non-fuzzer linux builds that have DCHECKs enabled.

Only enables the warning for chromium_code.n

Also fix the last few -Wextra-semi instances in sanitizer and linux/ozone builds.

Getting to this state required fixing > 3000 unique warnings in 15+ different
repositories.  If this breaks some internal-only build somewhere, either consider
using no_chromium_code for your internal code, or fix the warnings -- it's
pretty easy. (Build with treat_warnings_as_errors=false, then open the error log
in vim, run `:%g/warning:/t$` to copy the warnings to the end of the buffer,
remove all but just those lines, run `:sort u` to get uniques, then save as
`tmp.txt` and run `:cf %` and then use something like `:map m :w<cr>:cn<cr>`
to go through them quickly.)

TBR=rsesek

Bug: 926235
Change-Id: Ica629737523ff6bbd756edc44d182f35ff6cf8ac
Reviewed-on: https://chromium-review.googlesource.com/c/1483396Reviewed-by: default avatarScott Violet <sky@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634826}
parent b8af85f6
......@@ -9,6 +9,7 @@ import("//build/config/chromecast_build.gni")
import("//build/config/clang/clang.gni")
import("//build/config/compiler/compiler.gni")
import("//build/config/coverage/coverage.gni")
import("//build/config/dcheck_always_on.gni")
import("//build/config/host_byteorder.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
......@@ -1586,6 +1587,13 @@ config("chromium_code") {
# https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
"-Wthread-safety",
]
# TODO(thakis): Enable this for more platforms, https://crbug.com/926235
has_dchecks = is_debug || dcheck_always_on
if (has_dchecks && is_linux && target_os != "chromeos" && !is_chromecast &&
!use_libfuzzer && !is_debug) {
cflags += [ "-Wextra-semi" ]
}
}
configs = [ ":default_warnings" ]
......
......@@ -198,7 +198,7 @@ class SERVICE_MANAGER_SANDBOX_EXPORT SandboxLinux {
#if BUILDFLAG(USING_SANITIZER)
__sanitizer_sandbox_arguments* sanitizer_args() const {
return sanitizer_args_.get();
};
}
#endif
// A BrokerProcess is a helper that is started before the sandbox is engaged,
......
......@@ -41,7 +41,6 @@ class XDGPopupWrapperV6 : public XDGPopupWrapper {
private:
WaylandWindow* wayland_window_ = nullptr;
;
std::unique_ptr<XDGSurfaceWrapper> zxdg_surface_v6_;
wl::Object<zxdg_popup_v6> xdg_popup_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment