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

scanner.l:298: bad test ? #197

Closed
dcb314 opened this issue Nov 29, 2019 · 1 comment
Closed

scanner.l:298: bad test ? #197

dcb314 opened this issue Nov 29, 2019 · 1 comment

Comments

@dcb314
Copy link

dcb314 commented Nov 29, 2019

scanner.l:298:18: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]

Source code is

if ( *c != '.' || *c != ':' || !isxdigit(*c) )

maybe better code

if ( *c != '.' && *c != ':' && !isxdigit(*c) )

phaag added a commit that referenced this issue Dec 4, 2019
@phaag
Copy link
Owner

phaag commented Dec 4, 2019

Thanks for the hint. This was old code, no longer used and has been now removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants