12-08-2014, 03:44 PM
How can resolve next Notes??
Note 1960: Violates MISRA C++ 2008 Required Rule 5-0-6, Implicit conversion of integer to smaller type
Note 1960: Violates MISRA C++ 2008 Required Rule 5-0-3, Implicit conversion of integer cvalue expression
In this assignament:
CTU.EVTCFGR[fTriggerChannel].B.CHANNEL_VALUE = static_cast (fAdcChannel & 0xFFU);
Where CHANNEL_VALUE is:
union { /* Event Config 0..63 (Base+0x0030-0x012C) */
vuint32_t R;
struct {
vuint32_t :16;
vuint32_t TM:1;
vuint32_t CLR_FLAG:1;
vuint32_t :5;
vuint32_t ADC_SEL:1;
vuint32_t :1;
vuint32_t CHANNEL_VALUE:7;
} B;
} EVTCFGR[64];
Thanks in advance
Note 1960: Violates MISRA C++ 2008 Required Rule 5-0-6, Implicit conversion of integer to smaller type
Note 1960: Violates MISRA C++ 2008 Required Rule 5-0-3, Implicit conversion of integer cvalue expression
In this assignament:
CTU.EVTCFGR[fTriggerChannel].B.CHANNEL_VALUE = static_cast (fAdcChannel & 0xFFU);
Where CHANNEL_VALUE is:
union { /* Event Config 0..63 (Base+0x0030-0x012C) */
vuint32_t R;
struct {
vuint32_t :16;
vuint32_t TM:1;
vuint32_t CLR_FLAG:1;
vuint32_t :5;
vuint32_t ADC_SEL:1;
vuint32_t :1;
vuint32_t CHANNEL_VALUE:7;
} B;
} EVTCFGR[64];
Thanks in advance
<t></t>