This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

False detection of MISRA-C:2004 R17.6(TMS570)

Hello

I'm using TMS570LC4357 board for functional safety project.

In source code,

typedef struct
{
    double dE11, dE12, dE13;
    double dE21, dE22, dE23;
    double dE31, dE32, dE33;
}ROTATIONMATRIX;

void TransferMatrix(MATRIX *prmInOrient, MATRIX *prmOutOrient)
{

   prmOutOrient->dE11 = prmInOrient->dE11;  /* warning #1423-D: (MISRA-C:2004 17.6/R) */
   prmOutOrient->dE12 = prmInOrient->dE12; /* warning #1423-D: (MISRA-C:2004 17.6/R) */
   prmOutOrient->dE13 = prmInOrient->dE13; /* warning #1423-D: (MISRA-C:2004 17.6/R) */
   prmOutOrient->dE21 = prmInOrient->dE21; /* warning #1423-D: (MISRA-C:2004 17.6/R) */
   prmOutOrient->dE22 = prmInOrient->dE22; /* warning #1423-D: (MISRA-C:2004 17.6/R) */
   prmOutOrient->dE23 = prmInOrient->dE23; /* warning #1423-D: (MISRA-C:2004 17.6/R) */
   prmOutOrient->dE31 = prmInOrient->dE31; /* warning #1423-D: (MISRA-C:2004 17.6/R) */
   prmOutOrient->dE32 = prmInOrient->dE32; /* warning #1423-D: (MISRA-C:2004 17.6/R) */
   prmOutOrient->dE33 = prmInOrient->dE33; /* warning #1423-D: (MISRA-C:2004 17.6/R) */ 

}

I can't understand why above lines are not compliant to MISRA-C R17.6

For reference, CCS version is 6.1.1 and the compiler version is TI v5.2.7.

with best regards,

Charles

  • Another false detection case.

    int (*pFunctionPointer)(int a, int b);
    int TestFunction(int i, int j);

    pFunctionPointer = &TestFunction; /* makes violation of MISRA-C:2004 10.1/R */

    I would like to know if this warning is right or not.
    And If possible, I would like to get the false detection list for MISRA-C checker in TMS570 code generation tool.

    Thank you
    -Charles
  • Thank you for informing us about this problem. I can reproduce the same behavior.  I filed an entry in our bug tracking system to have it investigated.  We are presently transitioning to a new system.  Once I know the details, I will post the information which allows you to view the entry.

    Thanks and regards,

    -George

  • The ID for this issue is CODEGEN-24.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George