09-11-2015, 01:52 PM
I am trying to declare a constant for use in fixing the size of several C++ arrays. I have tried 3 options:
1) #'define MaxTracksConst 8
2) const Rhp_int32_t MaxTracksConst(8);
3) enum %s {one, two, three, four, five, six, seven, MaxTracksConst}
but our LDRA MISRA checker finds fault with all of them ( 1. fails 16-2-2, 2. fails 3-1-1 and 3. fails 4-5-2 ).
Am I missing something, or is there an option that will pass MISRA C++ 2008 checks ?
Kind regards
Insane Vent Storm
1) #'define MaxTracksConst 8
2) const Rhp_int32_t MaxTracksConst(8);
3) enum %s {one, two, three, four, five, six, seven, MaxTracksConst}
but our LDRA MISRA checker finds fault with all of them ( 1. fails 16-2-2, 2. fails 3-1-1 and 3. fails 4-5-2 ).
Am I missing something, or is there an option that will pass MISRA C++ 2008 checks ?
Kind regards
Insane Vent Storm
<t></t>