mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-28 16:14:20 +08:00
fix some -Wmissing-prototypes warnings
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#ifdef RT_USING_POSIX_STDIO
|
||||
#include <posix/stdio.h>
|
||||
#endif /* RT_USING_POSIX_STDIO */
|
||||
#include <posix/stdlib.h>
|
||||
|
||||
#define DBG_TAG "armlibc.syscalls"
|
||||
#define DBG_LVL DBG_INFO
|
||||
@@ -312,7 +313,6 @@ void _ttywrch(int ch)
|
||||
/* for exit() and abort() */
|
||||
rt_weak void _sys_exit(int return_code)
|
||||
{
|
||||
extern void __rt_libc_exit(int status);
|
||||
__rt_libc_exit(return_code);
|
||||
while (1);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <posix/stdlib.h>
|
||||
|
||||
#define DBG_TAG "stdlib"
|
||||
#define DBG_LVL DBG_INFO
|
||||
|
||||
@@ -18,6 +18,8 @@ extern "C" {
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void __rt_libc_exit(int status);
|
||||
|
||||
char *itoa(int n, char *buffer, int radix);
|
||||
char *lltoa(int64_t ll, char *buffer, int radix);
|
||||
char *ltoa(long l, char *buffer, int radix);
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <posix/stdlib.h>
|
||||
|
||||
/* for exit() and abort() */
|
||||
void __exit (int status)
|
||||
{
|
||||
extern void __rt_libc_exit(int status);
|
||||
__rt_libc_exit(status);
|
||||
while(1);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#ifdef RT_USING_POSIX_STDIO
|
||||
#include <posix/stdio.h>
|
||||
#endif /* RT_USING_POSIX_STDIO */
|
||||
#include <posix/stdlib.h>
|
||||
#ifdef RT_USING_MODULE
|
||||
#include <dlmodule.h>
|
||||
#endif /* RT_USING_MODULE */
|
||||
@@ -326,7 +327,6 @@ _ssize_t _write_r(struct _reent *ptr, int fd, const void *buf, size_t nbytes)
|
||||
/* for exit() and abort() */
|
||||
__attribute__ ((noreturn)) void _exit (int status)
|
||||
{
|
||||
extern void __rt_libc_exit(int status);
|
||||
__rt_libc_exit(status);
|
||||
while(1);
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <sys/types.h>
|
||||
#include <posix/stdlib.h>
|
||||
|
||||
/* for exit() and abort() */
|
||||
rt_noreturn void _exit (int status)
|
||||
{
|
||||
extern void __rt_libc_exit(int status);
|
||||
__rt_libc_exit(status);
|
||||
while(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user