Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
With the installation of the Full Static Analysis functionality, you get a Add-On help topic in the online help.
This describes the way how to deactivate specific rules.
For unused variables, which is SA0033, you can use:
  {attribute'analysis':='-33'}  itf_MyFB     :itf_FBExtended:=THIS^;  {attribute'analysis':='+33'}
This way, if i is not used, this is ignored by static analysis.
- is turning it off
+ is turning it back on
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2016-08-10
Originally created by: KevinR
Wow - Now it's working.
I think this needs definitly to be added to the standard pragma attribute list, because I didn't find it there.
Cheers,
Kevin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Originally created by: KevinR
Hello Community,
under projectsettings --> static analysis light, I enabled 'check for unused vars'.
So If I declare an output var like this:
I allways get a Static analysis error:
SA0033: unused var ....
How to avoid this message? I know, that there is an attribute to exclude warnings, but for Static Analysis I've nothing found in the online Help.
Thank you in advance.
With the installation of the Full Static Analysis functionality, you get a Add-On help topic in the online help.
This describes the way how to deactivate specific rules.
For unused variables, which is SA0033, you can use:
This way, if i is not used, this is ignored by static analysis.
- is turning it off
+ is turning it back on
Originally created by: KevinR
Wow - Now it's working.
I think this needs definitly to be added to the standard pragma attribute list, because I didn't find it there.
Cheers,
Kevin