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

clex/driver.c:444: Pointless test ? #124

Closed
dcb314 opened this issue Oct 18, 2016 · 2 comments
Closed

clex/driver.c:444: Pointless test ? #124

dcb314 opened this issue Oct 18, 2016 · 2 comments
Assignees
Labels

Comments

@dcb314
Copy link

dcb314 commented Oct 18, 2016

clex/driver.c:444:1: warning: V728 An excessive check can be simplified. The '||' operator is surrounded by opposite expressions '!started' and 'started'.

Source code is

if (!started || (started && which > (idx + n_toks)))

@eeide
Copy link
Member

eeide commented Oct 19, 2016

How would you simplify this test?

@UniQP
Copy link

UniQP commented Oct 19, 2016

if (!started || which > (idx + n_toks))

@eeide eeide self-assigned this Dec 19, 2016
@eeide eeide added the bug label Dec 19, 2016
eeide added a commit that referenced this issue Dec 19, 2016
Thanks to @dcb314 for reporting this.

This resolves GitHub issue #124.
@eeide eeide closed this as completed Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants