-
Notifications
You must be signed in to change notification settings - Fork 13.6k
lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h:89: possible && and || mixup ? #89195
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
Comments
@llvm/issue-subscribers-lldb Author: None (dcb314)
Source code analyser cppcheck says:
> trunk/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h:89:11: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] Source code is
I think the original coder wanted something like:
|
… (NFC) (#94779) Summary: The condition checking for missing class name, interpreter dictionary, and script object incorrectly used logical AND (&&), which could never be true to enter the 'if' block. This commit uses separate if conditions for each class name, interpreter dictionary, and script object. Cought by cppcheck - lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h:89:11: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h:91:16: warning: Identical inner 'if' condition is always true. [identicalInnerCondition] Fix #89195 --------- Co-authored-by: Shivam Gupta <[email protected]> Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250553
Source code analyser cppcheck says:
Source code is
I think the original coder wanted something like:
The text was updated successfully, but these errors were encountered: