[ci] fix errors under strick compiling mode

This commit is contained in:
Meco Man 2024-02-19 14:51:42 -05:00 committed by Rbb666
parent 4bec5f9b8f
commit bd228eb9c5
7 changed files with 58 additions and 21 deletions

View File

@ -207,6 +207,8 @@ rt_inline rt_size_t lwp_user_mm_flag_to_kernel(int flags)
rt_inline rt_size_t lwp_user_mm_attr_to_kernel(int prot)
{
RT_UNUSED(prot);
rt_size_t k_attr = 0;
#ifdef IMPL_MPROTECT

View File

@ -10,25 +10,52 @@
#ifndef __CACHE_H__
#define __CACHE_H__
#ifndef ALWAYS_INLINE
#define ALWAYS_INLINE inline __attribute__((always_inline))
#endif
#include <rtdef.h>
/**
* @brief These APIs may not be supported by a specified architecture
* But we have to include to all the cases to be 'general purpose'
*/
ALWAYS_INLINE void rt_hw_cpu_dcache_clean_local(void *addr, int size) {}
ALWAYS_INLINE void rt_hw_cpu_dcache_invalidate_local(void *addr, int size) {}
ALWAYS_INLINE void rt_hw_cpu_dcache_clean_and_invalidate_local(void *addr, int size) {}
rt_always_inline void rt_hw_cpu_dcache_clean_local(void *addr, int size)
{
RT_UNUSED(addr);
RT_UNUSED(size);
}
ALWAYS_INLINE void rt_hw_cpu_dcache_clean_all_local() {}
ALWAYS_INLINE void rt_hw_cpu_dcache_invalidate_all_local(void) {}
ALWAYS_INLINE void rt_hw_cpu_dcache_clean_and_invalidate_all_local(void) {}
rt_always_inline void rt_hw_cpu_dcache_invalidate_local(void *addr, int size)
{
RT_UNUSED(addr);
RT_UNUSED(size);
}
ALWAYS_INLINE void rt_hw_cpu_icache_invalidate_local(void *addr, int size) {}
ALWAYS_INLINE void rt_hw_cpu_icache_invalidate_all_local() {}
rt_always_inline void rt_hw_cpu_dcache_clean_and_invalidate_local(void *addr, int size)
{
RT_UNUSED(addr);
RT_UNUSED(size);
}
rt_always_inline void rt_hw_cpu_dcache_clean_all_local(void)
{
}
rt_always_inline void rt_hw_cpu_dcache_invalidate_all_local(void)
{
}
rt_always_inline void rt_hw_cpu_dcache_clean_and_invalidate_all_local(void)
{
}
rt_always_inline void rt_hw_cpu_icache_invalidate_local(void *addr, int size)
{
RT_UNUSED(addr);
RT_UNUSED(size);
}
rt_always_inline void rt_hw_cpu_icache_invalidate_all_local(void)
{
}
/**
* @brief Multi-core

View File

@ -304,6 +304,8 @@ static void idle_thread_entry(void *parameter)
#ifdef RT_USING_SMP
static void rt_thread_system_entry(void *parameter)
{
RT_UNUSED(parameter);
while (1)
{
int ret= rt_sem_take(&system_sem, RT_WAITING_FOREVER);

View File

@ -1026,6 +1026,11 @@ static char *print_number(char *buf,
return buf;
}
#ifdef __GNUC__
#pragma GCC diagnostic push
/* ignore warning: this statement may fall through */
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif /* __GNUC__ */
/**
* @brief This function will fill a formatted string to buffer.
*
@ -1345,6 +1350,9 @@ rt_weak int rt_vsnprintf(char *buf, rt_size_t size, const char *fmt, va_list arg
return str - buf;
}
RTM_EXPORT(rt_vsnprintf);
#ifdef __GNUC__
#pragma GCC diagnostic pop /* ignored "-Wimplicit-fallthrough" */
#endif /* __GNUC__ */
/**
* @brief This function will fill a formatted string to buffer.
@ -1568,6 +1576,8 @@ static void _console_release(void)
*/
static void _kputs(const char *str, long len)
{
RT_UNUSED(len);
CONSOLE_TAKE;
#ifdef RT_USING_DEVICE

View File

@ -290,16 +290,6 @@ void *rt_smem_alloc(rt_smem_t m, rt_size_t size)
RT_ASSERT(rt_object_get_type(&m->parent) == RT_Object_Class_Memory);
RT_ASSERT(rt_object_is_systemobject(&m->parent));
if (size != RT_ALIGN(size, RT_ALIGN_SIZE))
{
LOG_D("malloc size %d, but align to %d",
size, RT_ALIGN(size, RT_ALIGN_SIZE));
}
else
{
LOG_D("malloc size %d", size);
}
small_mem = (struct rt_small_mem *)m;
/* alignment size */
size = RT_ALIGN(size, RT_ALIGN_SIZE);

View File

@ -249,6 +249,9 @@ void rt_system_scheduler_init(void)
*/
void rt_scheduler_ipi_handler(int vector, void *param)
{
RT_UNUSED(vector);
RT_UNUSED(param);
rt_schedule();
}

View File

@ -41,12 +41,15 @@ void rt_thread_handle_sig(rt_bool_t clean_state);
static void _signal_default_handler(int signo)
{
RT_UNUSED(signo);
LOG_I("handled signo[%d] with default action.", signo);
return ;
}
static void _signal_entry(void *parameter)
{
RT_UNUSED(parameter);
rt_thread_t tid = rt_thread_self();
/* handle signal */