Navigation Menu

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

src/gpre/gpre.cpp:1815: possible bad if test ? [CORE4257] #4581

Open
firebird-automations opened this issue Nov 8, 2013 · 1 comment
Open

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: David Binderman (dcb314)

I just compiled the source code of firebirdsql-2.5.2 with extra Linux gcc compiler
flag -Wlogical-op.

It said

../src/gpre/gpre.cpp:1815:22: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op]
../src/jrd/ods.cpp:44:35: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op]

I've checked them both and they both look like && / || mixups.
Suggest code rework.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Condition in gpre.cpp looks like a bug, but the one in ods.cpp is correct - it depends on the macro ODS_VERSION that changes from version to version so that it could be "always false" in some FB versions and relevant in another FB versions.

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

No branches or pull requests

1 participant