Similar to my MISRA 8.7 comment we have what seem like 5.9 false positives.
It's not clear to me why the addon thinks the identifiers are not unique. The function referenced appears to be declared static in all the cases where it is used.
If I were to look into the .ctu-info files what I'm I looking for to find where it thinks the overlapping identifiers are.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I figured out why I was getting this error. cppcheck is analysing the same file twice, so presumably on the second time it thinks an identifier has already been defined.
In my Paths setup I had paths of "." and "drivers", so all files in "drivers" were being scanned twice. I can see in files.txt that the files are listed twice, first time with an "a1" suffix and again with an "a2 suffix.
Ideally cppcheck would recognise that source files have already been scanned, but a workaround is to ensure that files can only be found through once search path; check "files.txt" to verify that files have been scanned correctly. There should be only one entry for each file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Similar to my MISRA 8.7 comment we have what seem like 5.9 false positives.
It's not clear to me why the addon thinks the identifiers are not unique. The function referenced appears to be declared static in all the cases where it is used.
If I were to look into the .ctu-info files what I'm I looking for to find where it thinks the overlapping identifiers are.
I believe you can look at "MisraInternalIdentifiers"
I guess that if the identifier is listed 2 or more times there will be a 5.9 warning.
I am also seeing this, there is only one declaration of the identifier.
I figured out why I was getting this error. cppcheck is analysing the same file twice, so presumably on the second time it thinks an identifier has already been defined.
In my Paths setup I had paths of "." and "drivers", so all files in "drivers" were being scanned twice. I can see in files.txt that the files are listed twice, first time with an "a1" suffix and again with an "a2 suffix.
Ideally cppcheck would recognise that source files have already been scanned, but a workaround is to ensure that files can only be found through once search path; check "files.txt" to verify that files have been scanned correctly. There should be only one entry for each file.