From 28dc82580e50961f9b76933b20d576a6afc5035c Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Thu, 5 Jan 2023 09:50:11 +0100 Subject: [PATCH] fix(libc): remove __putchar alias This issue was triggered by sparse tool: lib/libc/putchar.c:9:5: warning: symbol '__putchar' was not declared. Should it be static? Instead of setting __putchar as static, just remove the function and directly use putchar() with a weak attribute. Signed-off-by: Yann Gautier Change-Id: Ib35e4ba064f06010851bb860269b08462fe3d3bd --- lib/libc/putchar.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/libc/putchar.c b/lib/libc/putchar.c index 3472b2436..340bdd83a 100644 --- a/lib/libc/putchar.c +++ b/lib/libc/putchar.c @@ -1,14 +1,13 @@ /* - * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include -int __putchar(int c) +#pragma weak putchar +int putchar(int c) { return c; } - -int putchar(int c) __attribute__((weak,alias("__putchar"))); -- 2.39.5