CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

Static Analysis use on CFC and errors disabling
https://forum.codesys.com/viewtopic.php?f=20&t=8389
Page 1 of 1

Author:  ert [ Tue Dec 12, 2017 11:00 am ]
Post subject:  Static Analysis use on CFC and errors disabling

1. Is it possible to disable some Static Analysis errors/warning when my POU is implemented in CFC? I know in ST code I can use pragmas {analysis '-...'}, but unsure if anything similar is possible on CFC code.

2. In some cases Static Analysis gives me warnings and I cannot disable them with pragmas. For example:

I generate a persistent variables list like below:

Code:
{attribute 'qualified_only'}
VAR_GLOBAL PERSISTENT RETAIN
   {attribute 'analysis' := '-12'}
   g_xCheck:      BOOL := FALSE;
   {attribute 'analysis' := '-12'}
   g_sText:      STRING := 'abc';
END_VAR


Then I place these variables somewhere in a Visualizaiton. The Static Analysis still reports "SA0012: g_xCheck could be declared as constant." - despite of the usage of pragma {attribute 'analysis' := '-12'}. I would like to disable it. What am I missing?

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/