[previous] 3614 [next] Macro '%s' is being defined more than once without using #undef to remove the previous definition.
Preprocessing

It is not permissible to change the definition of a macro without first removing the the previous definition with #undef. However it is permissible to issue duplicate definitions for a macro providing the definitions are identical

For example:


/*PRQA S 553,2017,3429,3453 ++*/

#define M1 1
#define M1 1                            /* Message 3614 */

#define M2 1
#define M2 2                            /* Message 3614 and 0844 */

#define M3(a,b) ((a) + (b))
#define M3(x,y) ((x) + (y))             /* Message 3614 and 0835 */

#define M4(a,b) ((a) + (b))
#define M4 3                            /* Message 3614 and 0834 */

#define M5 3
#define M5(a,b) ((a) + (b))             /* Message 3614 and 0845 */


No MISRA C:2012 Rules applicable to message 3614


See also:

QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents