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

lmdb: Remove meaningless const qualifier on function type #6093

Open
wants to merge 1 commit into
base: master
from

Conversation

@ndorf
Copy link
Contributor

ndorf commented Nov 4, 2019

23:04 <+hyc> would be nice sto shut these warnings up http://paste.debian.net/1113538/

n file included from /home/ubuntu/build/monero/src/lmdb/table.cpp:27:
/home/ubuntu/build/monero/src/lmdb/table.h:18:22: warning: 'const' qualifier on function type 'MDB_cmp_func' (aka 'int (const MDB_val *, const MDB_val )') has no effect [-Wignored-qualifiers]
MDB_cmp_func const
const key_cmp;
^~~~~
/home/ubuntu/build/monero/src/lmdb/table.h:19:22: warning: 'const' qualifier on function type 'MDB_cmp_func' (aka 'int (const MDB_val *, const MDB_val )') has no effect [-Wignored-qualifiers]
MDB_cmp_func const
const value_cmp;
^~~~~

A free function cannot be const, so a pointer to a const one is meaningless. The compiler ignores this qualifier, but warns about it.

@ndorf

This comment has been minimized.

Copy link
Contributor Author

ndorf commented Nov 4, 2019

Guess I should tag @hyc in case I missed something.

@vtnerd
vtnerd approved these changes Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.