-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
public bool returnsBoolButForgottenReturnStatments()
{
string dirname = getPath(DATA_REL_PATH, "", "", 1);
mkdir(dirname + "sample");
string filename = dirname + m_name;
string jsString = jsonEncode(m_list, false);
file fPtr = fopen(filename, "w");
if (fPtr != 0)
{
errClass err = makeError("sample", PRIO_INFO, ERR_PARAM, 2);
securityEvent(err, true);
fputs(jsString, fPtr);
fclose(fPtr);
ReloadJson();
}
else
{
throwError(makeError("", PRIO_SEVERE, ERR_PARAM, 61, filename));
}
}To Reproduce
See code example above.
Expected behavior
There should be a warning that the function has no return statement since the function claims that it returns a bool but never returns a value.
Software version and environment (please complete the following information):
- OS: Windows 10
- WinCC OA 3.19
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working