From c6bdee3c503a287a0967fd0e3cb6b7a1eb6d0b5e Mon Sep 17 00:00:00 2001 From: Yuqiang Wang <2053731441@qq.com> Date: Wed, 21 Feb 2024 11:45:04 +0800 Subject: [ci] open ci check with function declaration warning (#8546) --- src/SConscript | 2 +- src/cpu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/SConscript b/src/SConscript index 5ab18ef52a..3f3ef4455d 100644 --- a/src/SConscript +++ b/src/SConscript @@ -38,7 +38,7 @@ if rtconfig.PLATFORM in GetGCCLikePLATFORM(): LOCAL_CFLAGS += ' -Warray-bounds -Wuninitialized' # memory access warning LOCAL_CFLAGS += ' -Wreturn-type -Wcomment -Wswitch' # code style warning LOCAL_CFLAGS += ' -Wparentheses -Wlogical-op ' # operation warning - # LOCAL_CFLAGS += ' -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes' # function declaration warning + LOCAL_CFLAGS += ' -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes' # function declaration warning if 'mips' not in rtconfig.PREFIX: # mips toolchain does not support LOCAL_CFLAGS += ' -Wimplicit-fallthrough' # implicit fallthrough warning LOCAL_CFLAGS += ' -Wduplicated-cond -Wduplicated-branches' # duplicated condition warning diff --git a/src/cpu.c b/src/cpu.c index 686b67a4ea..bb058d6d67 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -94,7 +94,7 @@ RTM_EXPORT(rt_spin_unlock) */ rt_base_t rt_spin_lock_irqsave(struct rt_spinlock *lock) { - unsigned long level; + rt_base_t level; level = rt_hw_local_irq_disable(); rt_enter_critical(); -- cgit v1.3.1