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 <yann.gautier@st.com>
Change-Id: Ib35e4ba064f06010851bb860269b08462fe3d3bd
This commit is contained in:
Yann Gautier 2023-01-05 09:50:11 +01:00
parent 03bd48102b
commit 28dc82580e

View file

@ -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 <stdio.h>
int __putchar(int c)
#pragma weak putchar
int putchar(int c)
{
return c;
}
int putchar(int c) __attribute__((weak,alias("__putchar")));