sparse: fix all errors
sparse complains about cbprintf incompatible callback type and incorrect size of struct __va_list. Add exceptions to silence those errors. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
7a85ff7683
commit
462bd8abc2
2 changed files with 13 additions and 1 deletions
|
@ -155,7 +155,11 @@ BUILD_ASSERT(Z_IS_POW2(CBPRINTF_PACKAGE_ALIGNMENT));
|
|||
* int, or a negative error code that will be returned from
|
||||
* cbprintf().
|
||||
*/
|
||||
#ifdef __CHECKER__
|
||||
typedef int (*cbprintf_cb)(int c, void *ctx);
|
||||
#else
|
||||
typedef int (*cbprintf_cb)(/* int c, void *ctx */);
|
||||
#endif
|
||||
|
||||
/** @brief Signature for a external formatter function identical to cbvprintf.
|
||||
*
|
||||
|
|
|
@ -38,7 +38,15 @@ static inline bool ptr_in_rodata(const char *addr)
|
|||
* va_list creation
|
||||
*/
|
||||
|
||||
#if defined(__aarch64__)
|
||||
#if defined(__CHECKER__)
|
||||
static int cbprintf_via_va_list(cbprintf_cb out,
|
||||
cbvprintf_exteral_formatter_func formatter,
|
||||
void *ctx,
|
||||
const char *fmt, void *buf)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#elif defined(__aarch64__)
|
||||
/*
|
||||
* Reference:
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue