diff options
author | Tom Hughes <tomhughes@chromium.org> | 2022-06-06 11:21:48 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-09 00:02:10 +0000 |
commit | f40490f84a0a0d080e41f4fb9c954715c2696073 (patch) | |
tree | 569a3472a2c119fc5126298a980495d29d0e5cc9 | |
parent | 74215f789c53e835461de7499155be39a7530163 (diff) | |
download | chrome-ec-f40490f84a0a0d080e41f4fb9c954715c2696073.tar.gz |
assert.h: Remove unnecessary extern
Functions in C are extern by default; it's not necessary in a header
file. The extern combined with noreturn causes a compiler error when
building with C++:
./builtin/assert.h:33:8: error: an attribute list cannot appear here
extern noreturn void panic_assert_fail(const char *msg, const char *func,
^~~~~~~~
BRANCH=none
BUG=b:234181908
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I7a2a86e57569bc90bb1ab93d5703217eabc042a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3691957
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r-- | builtin/assert.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/assert.h b/builtin/assert.h index fb87f844ce..010198fd1b 100644 --- a/builtin/assert.h +++ b/builtin/assert.h @@ -21,7 +21,7 @@ extern "C" { #ifdef CONFIG_DEBUG_ASSERT_REBOOTS #ifdef CONFIG_DEBUG_ASSERT_BRIEF -extern noreturn void panic_assert_fail(const char *fname, int linenum); +noreturn void panic_assert_fail(const char *fname, int linenum); #define ASSERT(cond) \ do { \ if (!(cond)) \ @@ -30,8 +30,8 @@ extern noreturn void panic_assert_fail(const char *fname, int linenum); #else /* !CONFIG_DEBUG_ASSERT_BRIEF */ -extern noreturn void panic_assert_fail(const char *msg, const char *func, - const char *fname, int linenum); +noreturn void panic_assert_fail(const char *msg, const char *func, + const char *fname, int linenum); #define ASSERT(cond) \ do { \ if (!(cond)) \ |