liuis / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

warning in cache.cc #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the Chrome build:

third_party/leveldb/util/cache.cc(115) : warning C4018: '<' : signed/unsigned 
mismatch

Code looks like:

    memset(new_list, 0, sizeof(new_list[0]) * new_length);
    uint32_t count = 0;
    for (int i = 0; i < length_; i++) {   // L115
      LRUHandle* h = list_[i];
      while (h != NULL) {

length_ is a uint32_t.  Probably just need to change i to uint32_t.

Original issue reported on code.google.com by ev...@google.com on 13 Jul 2011 at 11:46

GoogleCodeExporter commented 9 years ago
Some additional warnings of the same flavor:

third_party/leveldb/db/version_set.cc(105) : warning C4018: '<' : 
signed/unsigned mismatch
third_party/leveldb/db/version_set.cc(266) : warning C4018: '<' : 
signed/unsigned mismatch
third_party/leveldb/db/version_set.cc(297) : warning C4018: '<' : 
signed/unsigned mismatch
third_party/leveldb/db/version_set.cc(435) : warning C4018: '<' : 
signed/unsigned mismatch
third_party/leveldb/db/version_set.cc(526) : warning C4018: '<' : 
signed/unsigned mismatch

Original comment by ev...@google.com on 13 Jul 2011 at 11:47

GoogleCodeExporter commented 9 years ago

Original comment by tfar...@chromium.org on 17 Jul 2011 at 5:35

GoogleCodeExporter commented 9 years ago
Evmar, these should be fixed in r47.  Should get rolled into chromium when 
http://codereview.chromium.org/7522008/ is committed.

Original comment by dgrogan@chromium.org on 6 Aug 2011 at 12:27