Skip to content

False positives with 'startThread' #119

@schijndelg

Description

@schijndelg

Describe the bug
Comparing the returned value of 'startThread' with an integer results in a 'comparisonOfBoolWithBoolError' warning.
Also passing a function without arguments to 'startThread' results in another warning 'checkLibraryFunctionArgCount'.

To Reproduce
Steps to reproduce the behavior:
Run CtrlPPcheck on the following code:

if (startThread("myFunction") < 0)
{
  throwError(...);
}

void myFunction()
{
  // Do something
}

And check the output

Expected behavior
There should be no false positives in the output

Software version and environment (please complete the following information):

  • OS: Windows & Debian Linux
  • WinCC OA Version: 3.20

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions