[previous] MISRA C:2012  Rule-17.1:  (Required) [next] The features of <stdarg.h> shall not be used

Amplification:

None of va_list, va_arg, va_start, va_end and, for C99, va_copy shall be used.

Example Code:


#include <stdarg.h>                             /* 5130 */
#include "misra.h"
#include "m3cmex.h"

static void rule_1701a (uint16_t n, ...);

extern int16_t rule_1701( void )
{
    rule_1701a(1,2);

    return 1;
}

static void rule_1701a (uint16_t n, ...)        /* 1337 */
{
    u16a = n;
}


QAC messages that encompass this guideline:

1337 Function defined with a variable number of parameters.
5130 Use of standard header file <stdarg.h>.



(c) The Motor Industry Research Association, 2012
QA C Source Code Analyser 8.1.2
MISRA C:2012 Compliance Module 1.0
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents