mirror of https://github.com/thesofproject/sof.git
panic: noreturn attribute for scan build
Add noreturn attribute to decrease number of false positives when using assert / panic. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
parent
1ff2760500
commit
9e1a2b251a
|
@ -20,7 +20,12 @@
|
||||||
void dump_panicinfo(void *addr, struct sof_ipc_panic_info *panic_info);
|
void dump_panicinfo(void *addr, struct sof_ipc_panic_info *panic_info);
|
||||||
void panic_rewind(uint32_t p, uint32_t stack_rewind_frames,
|
void panic_rewind(uint32_t p, uint32_t stack_rewind_frames,
|
||||||
struct sof_ipc_panic_info *panic_info, uintptr_t *data);
|
struct sof_ipc_panic_info *panic_info, uintptr_t *data);
|
||||||
|
#if __clang_analyzer__
|
||||||
|
void __panic(uint32_t p, char *filename, uint32_t linenum)
|
||||||
|
__attribute__((analyzer_noreturn));
|
||||||
|
#else
|
||||||
void __panic(uint32_t p, char *filename, uint32_t linenum);
|
void __panic(uint32_t p, char *filename, uint32_t linenum);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* panic dump filename and linenumber of the call */
|
/* panic dump filename and linenumber of the call */
|
||||||
#define panic(x) __panic((x), (RELATIVE_FILE), (__LINE__))
|
#define panic(x) __panic((x), (RELATIVE_FILE), (__LINE__))
|
||||||
|
|
Loading…
Reference in New Issue