I'm getting warnings in Xcode after updating to the recommended pod settings. The warning is
Possible misuse of comma operator here
with a suggested fix of
Cast expression to void to silence warning
The warnings occur in leveldb-library/db/c.cc at the start and limit keys:
void leveldb_compact_range(
leveldb_t* db,
const char* start_key, size_t start_key_len,
const char* limit_key, size_t limit_key_len) {
Slice a, b;
db->rep->CompactRange(
// Pass NULL Slice if corresponding "const char*" is NULL
(start_key ? (a = Slice(start_key, start_key_len), &a) : NULL),
(limit_key ? (b = Slice(limit_key, limit_key_len), &b) : NULL));
}
Has anyone else had the same or know what's causing it? I'm running Cocoapods 1.2.0.
leveldb now builds without warnings after a pod update
to version 1.20 of the leveldb-library CocoaPod.
This solution works for me.
Code:
if (++keyIndexValue == [self.str length])
keyIndexValue = 0, keyPtr = keyData;
I've solved it by splitting the statements over multiple lines within the "if" condition:
"If at end of key data, reset count and set key pointer back to start of key value"
if (++keyIndexValue == [self.str length])
{
keyIndexValue = 0;
keyPtr = keyData;
}
We are aware of the warning, we'll update the version once the leveldb fixes the issue. For now you can ignore the warnings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With