Possible comma abuse here

I get warnings in Xcode after updating to the recommended module settings. Warning

Possible misuse of comma operator here

with the proposed fix

Cast expression to void to silence warning

Warnings occur in the leveldb-library / db / c.cc on the start and end 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 thing or knew what caused it? I am running Cocoapods 1.2.0.

+6
source share
3 answers

leveldb now builds without warning after pod updatebefore version 1.20 in the leveldb cdc library file.

+4
source

We know about the warning, we will update the version after fixing the leveldb problem. You can ignore warnings at this time.

+1
source

.

:

 if (++keyIndexValue == [self.str length])
    keyIndexValue = 0, keyPtr = keyData;

, "":

" "

if (++keyIndexValue == [self.str length])
{
   keyIndexValue = 0;
   keyPtr = keyData;
}
0
source

Source: https://habr.com/ru/post/1688031/


All Articles