misra: Fixes for MISRA-C rule 8.2

In C90 was introduced function prototype, that allows argument types
to be checked against parameter types, though it is not necessary
specify names for the parameters. MISRA-C requires names for function
prototype parameters, it claims that names can provide useful
information regarding the function interface.

MISRA-C rule 8.2

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-11-16 19:06:59 -08:00 committed by Anas Nashif
commit 4b35dd2628
6 changed files with 10 additions and 10 deletions

View file

@ -24,8 +24,8 @@
#include <kswap.h>
#include <arch/x86/segmentation.h>
extern void _SpuriousIntHandler(void *);
extern void _SpuriousIntNoErrCodeHandler(void *);
extern void _SpuriousIntHandler(void *handler);
extern void _SpuriousIntNoErrCodeHandler(void *handler);
/*
* Place the addresses of the spurious interrupt handlers into the intList

View file

@ -14,7 +14,7 @@ extern "C" {
#endif
extern int _is_clflush_available(void);
extern void _cache_flush_wbinvd(vaddr_t, size_t);
extern void _cache_flush_wbinvd(vaddr_t addr, size_t len);
extern size_t _cache_line_size_get(void);
#ifdef __cplusplus

View file

@ -1316,10 +1316,10 @@ struct k_timer {
_wait_q_t wait_q;
/* runs in ISR context */
void (*expiry_fn)(struct k_timer *);
void (*expiry_fn)(struct k_timer *timer);
/* runs in the context of the thread that calls k_timer_stop() */
void (*stop_fn)(struct k_timer *);
void (*stop_fn)(struct k_timer *timer);
/* timer period */
s32_t period;
@ -4907,7 +4907,7 @@ __syscall void k_str_out(char *c, size_t n);
* @param arg Untyped argument to be passed to "fn"
*/
extern void _arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
void (*fn)(int, void *), void *arg);
void (*fn)(int key, void *data), void *arg);
#ifdef __cplusplus
}

View file

@ -471,7 +471,7 @@ static inline void sys_dlist_insert_before(sys_dlist_t *list,
*/
static inline void sys_dlist_insert_at(sys_dlist_t *list, sys_dnode_t *node,
int (*cond)(sys_dnode_t *, void *), void *data)
int (*cond)(sys_dnode_t *node, void *data), void *data)
{
if (sys_dlist_is_empty(list)) {
sys_dlist_append(list, node);

View file

@ -49,7 +49,7 @@ extern __printf_like(3, 4) int snprintk(char *str, size_t size,
extern __printf_like(3, 0) int vsnprintk(char *str, size_t size,
const char *fmt, va_list ap);
extern __printf_like(3, 0) void _vprintk(int (*out)(int, void *), void *ctx,
extern __printf_like(3, 0) void _vprintk(int (*out)(int f, void *c), void *ctx,
const char *fmt, va_list ap);
#else
static inline __printf_like(1, 2) void printk(const char *fmt, ...)

View file

@ -93,8 +93,8 @@ void _timer_expiration_handler(struct _timeout *t)
void k_timer_init(struct k_timer *timer,
void (*expiry_fn)(struct k_timer *),
void (*stop_fn)(struct k_timer *))
void (*expiry_fn)(struct k_timer *t),
void (*stop_fn)(struct k_timer *t))
{
timer->expiry_fn = expiry_fn;
timer->stop_fn = stop_fn;