# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

include("${ZEPHYR_BASE}/cmake/compiler/clang/compiler_flags.cmake")

# Disable -fno-freestanding.
set_compiler_property(PROPERTY hosted)

check_set_compiler_property(APPEND PROPERTY warning_extended -Wunused-variable
	-Werror=unused-variable -Werror=missing-braces
	-Werror=sometimes-uninitialized)

# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

include("${ZEPHYR_BASE}/cmake/compiler/clang/compiler_flags.cmake")

# Disable -fno-freestanding.
set_compiler_property(PROPERTY hosted)

check_set_compiler_property(APPEND PROPERTY warning_extended -Wunused-variable
	-Werror=unused-variable -Werror=missing-braces
	-Werror=sometimes-uninitialized -Werror=unused-function
	-Werror=array-bounds)

Add more compiler warnings as errors
zephyr: Add more compiler warnings as errors

Added unused-function and array-bounds, this should help prevent gitlab
failures.

BRANCH=None
BUG=None
TEST=zmake testall

Change-Id: Iebeaa8fc64990c844e43daf8b979c7f243a93bcc
Signed-off-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3340212
Reviewed-by: Yuval Peress <50dc11c009bd4d7e9d9d15a383c1743ce5ee82ef@google.com>
Commit-Queue: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@chromium.org>
Tested-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@chromium.org>
