fix some -Wmissing-prototypes warnings
This commit is contained in:
parent
92bd28f22b
commit
6cc63626d7
|
@ -39,6 +39,11 @@ struct rt_pipe_device
|
||||||
typedef struct rt_pipe_device rt_pipe_t;
|
typedef struct rt_pipe_device rt_pipe_t;
|
||||||
|
|
||||||
rt_pipe_t *rt_pipe_create(const char *name, int bufsz);
|
rt_pipe_t *rt_pipe_create(const char *name, int bufsz);
|
||||||
|
rt_err_t rt_pipe_open(rt_device_t device, rt_uint16_t oflag);
|
||||||
|
rt_ssize_t rt_pipe_read(rt_device_t device, rt_off_t pos, void *buffer, rt_size_t count);
|
||||||
|
rt_ssize_t rt_pipe_write(rt_device_t device, rt_off_t pos, const void *buffer, rt_size_t count);
|
||||||
|
rt_err_t rt_pipe_control(rt_device_t dev, int cmd, void *args);
|
||||||
|
rt_err_t rt_pipe_close(rt_device_t device);
|
||||||
int rt_pipe_delete(const char *name);
|
int rt_pipe_delete(const char *name);
|
||||||
|
|
||||||
#endif /* PIPE_H__ */
|
#endif /* PIPE_H__ */
|
||||||
|
|
|
@ -51,14 +51,13 @@ static long clear(void)
|
||||||
}
|
}
|
||||||
MSH_CMD_EXPORT(clear, clear the terminal screen);
|
MSH_CMD_EXPORT(clear, clear the terminal screen);
|
||||||
|
|
||||||
extern void rt_show_version(void);
|
static long rtthread_version(void)
|
||||||
long version(void)
|
|
||||||
{
|
{
|
||||||
rt_show_version();
|
rt_show_version();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
MSH_CMD_EXPORT(version, show RT-Thread version information);
|
MSH_CMD_EXPORT(rtthread_version, show RT-Thread version information);
|
||||||
|
|
||||||
rt_inline void object_split(int len)
|
rt_inline void object_split(int len)
|
||||||
{
|
{
|
||||||
|
@ -929,7 +928,7 @@ long list_device(void)
|
||||||
#endif /* RT_USING_DEVICE */
|
#endif /* RT_USING_DEVICE */
|
||||||
|
|
||||||
#ifndef FINSH_USING_OPTION_COMPLETION
|
#ifndef FINSH_USING_OPTION_COMPLETION
|
||||||
int cmd_list(int argc, char **argv)
|
static int cmd_list(int argc, char **argv)
|
||||||
{
|
{
|
||||||
if(argc == 2)
|
if(argc == 2)
|
||||||
{
|
{
|
||||||
|
@ -1042,7 +1041,7 @@ _usage:
|
||||||
|
|
||||||
#else
|
#else
|
||||||
CMD_OPTIONS_STATEMENT(cmd_list)
|
CMD_OPTIONS_STATEMENT(cmd_list)
|
||||||
int cmd_list(int argc, char **argv)
|
static int cmd_list(int argc, char **argv)
|
||||||
{
|
{
|
||||||
if (argc == 2)
|
if (argc == 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
typedef int (*cmd_function_t)(int argc, char **argv);
|
typedef int (*cmd_function_t)(int argc, char **argv);
|
||||||
|
|
||||||
int msh_help(int argc, char **argv)
|
static int msh_help(int argc, char **argv)
|
||||||
{
|
{
|
||||||
rt_kprintf("RT-Thread shell commands:\n");
|
rt_kprintf("RT-Thread shell commands:\n");
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ int msh_help(int argc, char **argv)
|
||||||
MSH_CMD_EXPORT_ALIAS(msh_help, help, RT-Thread shell help);
|
MSH_CMD_EXPORT_ALIAS(msh_help, help, RT-Thread shell help);
|
||||||
|
|
||||||
#ifdef MSH_USING_BUILT_IN_COMMANDS
|
#ifdef MSH_USING_BUILT_IN_COMMANDS
|
||||||
int cmd_ps(int argc, char **argv)
|
static int cmd_ps(int argc, char **argv)
|
||||||
{
|
{
|
||||||
extern long list_thread(void);
|
extern long list_thread(void);
|
||||||
extern int list_module(void);
|
extern int list_module(void);
|
||||||
|
@ -72,7 +72,7 @@ int cmd_ps(int argc, char **argv)
|
||||||
MSH_CMD_EXPORT_ALIAS(cmd_ps, ps, List threads in the system);
|
MSH_CMD_EXPORT_ALIAS(cmd_ps, ps, List threads in the system);
|
||||||
|
|
||||||
#ifdef RT_USING_HEAP
|
#ifdef RT_USING_HEAP
|
||||||
int cmd_free(int argc, char **argv)
|
static int cmd_free(int argc, char **argv)
|
||||||
{
|
{
|
||||||
#ifdef RT_USING_MEMHEAP_AS_HEAP
|
#ifdef RT_USING_MEMHEAP_AS_HEAP
|
||||||
extern void list_memheap(void);
|
extern void list_memheap(void);
|
||||||
|
|
|
@ -448,7 +448,7 @@ static void shell_push_history(struct finsh_shell *shell)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void finsh_thread_entry(void *parameter)
|
static void finsh_thread_entry(void *parameter)
|
||||||
{
|
{
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
|
@ -690,7 +690,7 @@ void finsh_thread_entry(void *parameter)
|
||||||
} /* end of device read */
|
} /* end of device read */
|
||||||
}
|
}
|
||||||
|
|
||||||
void finsh_system_function_init(const void *begin, const void *end)
|
static void finsh_system_function_init(const void *begin, const void *end)
|
||||||
{
|
{
|
||||||
_syscall_table_begin = (struct finsh_syscall *) begin;
|
_syscall_table_begin = (struct finsh_syscall *) begin;
|
||||||
_syscall_table_end = (struct finsh_syscall *) end;
|
_syscall_table_end = (struct finsh_syscall *) end;
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#ifdef RT_USING_POSIX_STDIO
|
#ifdef RT_USING_POSIX_STDIO
|
||||||
#include <posix/stdio.h>
|
#include <posix/stdio.h>
|
||||||
#endif /* RT_USING_POSIX_STDIO */
|
#endif /* RT_USING_POSIX_STDIO */
|
||||||
|
#include <posix/stdlib.h>
|
||||||
|
|
||||||
#define DBG_TAG "armlibc.syscalls"
|
#define DBG_TAG "armlibc.syscalls"
|
||||||
#define DBG_LVL DBG_INFO
|
#define DBG_LVL DBG_INFO
|
||||||
|
@ -312,7 +313,6 @@ void _ttywrch(int ch)
|
||||||
/* for exit() and abort() */
|
/* for exit() and abort() */
|
||||||
rt_weak void _sys_exit(int return_code)
|
rt_weak void _sys_exit(int return_code)
|
||||||
{
|
{
|
||||||
extern void __rt_libc_exit(int status);
|
|
||||||
__rt_libc_exit(return_code);
|
__rt_libc_exit(return_code);
|
||||||
while (1);
|
while (1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
#include <posix/stdlib.h>
|
||||||
|
|
||||||
#define DBG_TAG "stdlib"
|
#define DBG_TAG "stdlib"
|
||||||
#define DBG_LVL DBG_INFO
|
#define DBG_LVL DBG_INFO
|
||||||
|
|
|
@ -18,6 +18,8 @@ extern "C" {
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
void __rt_libc_exit(int status);
|
||||||
|
|
||||||
char *itoa(int n, char *buffer, int radix);
|
char *itoa(int n, char *buffer, int radix);
|
||||||
char *lltoa(int64_t ll, char *buffer, int radix);
|
char *lltoa(int64_t ll, char *buffer, int radix);
|
||||||
char *ltoa(long l, char *buffer, int radix);
|
char *ltoa(long l, char *buffer, int radix);
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
#include <posix/stdlib.h>
|
||||||
|
|
||||||
/* for exit() and abort() */
|
/* for exit() and abort() */
|
||||||
void __exit (int status)
|
void __exit (int status)
|
||||||
{
|
{
|
||||||
extern void __rt_libc_exit(int status);
|
|
||||||
__rt_libc_exit(status);
|
__rt_libc_exit(status);
|
||||||
while(1);
|
while(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#ifdef RT_USING_POSIX_STDIO
|
#ifdef RT_USING_POSIX_STDIO
|
||||||
#include <posix/stdio.h>
|
#include <posix/stdio.h>
|
||||||
#endif /* RT_USING_POSIX_STDIO */
|
#endif /* RT_USING_POSIX_STDIO */
|
||||||
|
#include <posix/stdlib.h>
|
||||||
#ifdef RT_USING_MODULE
|
#ifdef RT_USING_MODULE
|
||||||
#include <dlmodule.h>
|
#include <dlmodule.h>
|
||||||
#endif /* RT_USING_MODULE */
|
#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() */
|
/* for exit() and abort() */
|
||||||
__attribute__ ((noreturn)) void _exit (int status)
|
__attribute__ ((noreturn)) void _exit (int status)
|
||||||
{
|
{
|
||||||
extern void __rt_libc_exit(int status);
|
|
||||||
__rt_libc_exit(status);
|
__rt_libc_exit(status);
|
||||||
while(1);
|
while(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
|
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <posix/stdlib.h>
|
||||||
|
|
||||||
/* for exit() and abort() */
|
/* for exit() and abort() */
|
||||||
rt_noreturn void _exit (int status)
|
rt_noreturn void _exit (int status)
|
||||||
{
|
{
|
||||||
extern void __rt_libc_exit(int status);
|
|
||||||
__rt_libc_exit(status);
|
__rt_libc_exit(status);
|
||||||
while(1);
|
while(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue