mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 09:06:32 +00:00
新增错误判断的宏,以及返回值使用检测
This commit is contained in:
@ -9,4 +9,9 @@
|
||||
// 内存屏障
|
||||
#define barrier() __asm__ __volatile__("" :: \
|
||||
: "memory");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// 编译器属性
|
||||
|
||||
// 当函数的返回值未被使用时,编译器抛出警告信息
|
||||
#define __must_check __attribute__((__warn_unused_result__))
|
Reference in New Issue
Block a user