Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regd-Rule 12.6 and 12.7
#1
The following code is Auto generated code from Embedded Coder of Matlab Simulink.

Code:
tmp = Common_Signal_Process_DWork.UnitDelay_DSTATE_b[1] * ((int16_T)(16384 -
      Common_Signal_Process_DWork.UnitDelay3_DSTATE_d));

    /* Switch: '/Thrs~=4' incorporates:
     *  Product: '/Product1'
     *  Switch: '/Thrs~=3'
     */
    rtb_Thrs5_idx_1 = (int16_T)((tmp >> 14) + ((tmp & 8192) != 0));
    rtb_Thrs5_idx_2 = Common_Signal_Process_DWork.UnitDelay_DSTATE_b[2];
    rtb_Thrs5_idx_3 = Common_Signal_Process_DWork.UnitDelay_DSTATE_b[3];
  }


rtb_Thrs5_idx_1 = (int16_T)((tmp >> 14) + ((tmp & 8192) != 0));
On the Highlighted code above, we are getting MISRA-C 12.6 and 12.7 Rule violations. How to remove this violation?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)