Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive: PLCOpen CP1 #16

Open
jubnzv opened this issue Oct 26, 2022 · 0 comments
Open

False positive: PLCOpen CP1 #16

jubnzv opened this issue Oct 26, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@jubnzv
Copy link
Owner

jubnzv commented Oct 26, 2022

The following snippet raises false positive for CP1:

PROGRAM l10
  VAR
  END_VAR

   %MW10.2.4.1 := 42; (* False positive PLCOPEN-CP1 *)
END_PROGRAM

Actually, this warning should be reported only when accessing a direct located struct member, as it is specified in the example from the PLCOpen document:

STRUCT EXAMPLE_STRUCT
X : DINT
Y : BOOL;
Z : STRING[40];
END_STRUCT;
VAR
instance : EXAMPLE_STRUCT AT %MW500;
END_VAR
// Write the first character of Z:
%MW504 := 'E';
@jubnzv jubnzv added the bug Something isn't working label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant