diff options
| author | Yann Gautier <yann.gautier@st.com> | 2023-01-05 09:50:11 +0100 |
|---|---|---|
| committer | Yann Gautier <yann.gautier@st.com> | 2023-01-11 09:18:50 +0100 |
| commit | 28dc82580e50961f9b76933b20d576a6afc5035c (patch) | |
| tree | 6637315f9ff3db72d3ab966dd90f0a752e81cddf /lib | |
| parent | 03bd48102b575a9c86eed73866a5f9cd4d03e2d5 (diff) | |
| download | arm-trusted-firmware-28dc82580e50961f9b76933b20d576a6afc5035c.tar.gz | |
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
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/putchar.c | 7 |
1 files 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 <stdio.h> -int __putchar(int c) +#pragma weak putchar +int putchar(int c) { return c; } - -int putchar(int c) __attribute__((weak,alias("__putchar"))); |
