Hello,
In the file common/bl_common.c and other related files, there are instances where function parameters are being modified. This leads to violations when running the Coverity MISRA-C analysis for the ZynqMP platform. To address this issue a new variable is declared and used to store the value from the argument in the code. Is it possible to fix by taking a new variable? Please provide your suggestions.
Regards, Nithin G
Hello Nithin,
Indeed I can see that ECLAIR tool reports 2 violations to MISRA rule 17.8 in common/bl_common.c at lines 54 and 56.
According to TF-A MISRA policy [1], we've decided to treat rule 17.8 as optional, which means that in some places the code is compliant and in other places (like in common/bl_common.c) it is not.
That being said, I have no objection if you want to propose a patch to fix 17.8 violations into common/bl_common.c code which uses a new variable to store the argument value. Feel free to add me as a reviewer in Gerrit.
Best regards, Sandrine
[1] https://developer.trustedfirmware.org/w/tf_a/tf-a-misra-analysis/
On 12/7/23 13:36, Nithin G via TF-A wrote:
Hello,
In the file common/bl_common.c and other related files, there are instances where function parameters are being modified. This leads to violations when running the Coverity MISRA-C analysis for the ZynqMP platform. To address this issue a new variable is declared and used to store the value from the argument in the code. Is it possible to fix by taking a new variable? Please provide your suggestions.
Regards, Nithin G
tf-a@lists.trustedfirmware.org