I'm getting a lot of false positives for Misra Rules 5.1 to 5.5. Looking at the misra.py code, I see that a lot of string comparisons only compare the first 32 characters (i.e., [:31]). Is this a CPPCheck addon limitation that you truncate all strings to the first 32 characters?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are correct. I stand corrected. It is annoying since I found two identical macros and our code has a ton of macros that are identical for the first 31 characters. Lucky for me I can change the Python code as I desire. I'm checking for equality only.
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm getting a lot of false positives for Misra Rules 5.1 to 5.5. Looking at the misra.py code, I see that a lot of string comparisons only compare the first 32 characters (i.e., [:31]). Is this a CPPCheck addon limitation that you truncate all strings to the first 32 characters?
Thanks!
I believe this is done because the MISRA pdf specify the rules this way.
I might be wrong... I don't have the pdf right here now so I can't double check.
You are correct. I stand corrected. It is annoying since I found two identical macros and our code has a ton of macros that are identical for the first 31 characters. Lucky for me I can change the Python code as I desire. I'm checking for equality only.
Thanks!