uthash.h: fix compiler warning -Wcast-qual
The macro HASH_ADD_KEYPTR_BYHASHVALUE casts keyptr to (char *) hence violating const keys. As the key is used read-only, the UT_hash_handle structure can be changed to const void *key, allowing the cast to (const void *) instead. This fixes compiler warnings emitted when -Wcast-qual is specified.
parent
ba2fbfdc
Please register or sign in to comment