]> git.sesse.net Git - remoteglot-book/commitdiff
Fix a warning in binloader.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 15 Dec 2014 00:53:31 +0000 (01:53 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 15 Dec 2014 00:53:31 +0000 (01:53 +0100)
binloader.cpp

index a0304561c0c5ee7dfb0be31e6465a7a6315b0611..115cba61f571298146cf66ad44c0d473f3dafb3c 100644 (file)
@@ -104,9 +104,10 @@ void write_subshard(const char *basename, ShardData* shard, int bucket)
                    e.bpfen_len != shard->elems[i + 1].bpfen_len ||
                    memcmp(e.bpfen, shard->elems[i + 1].bpfen, e.bpfen_len) != 0) {
                        c.SerializeToString(&buf);
-                       mtbl_writer_add(mtbl,
+                       mtbl_res res = mtbl_writer_add(mtbl,
                                (const uint8_t *)e.bpfen, e.bpfen_len,
                                (const uint8_t *)buf.data(), buf.size());
+                       assert(res == mtbl_res_success);
                        c = Count();
                        moves.clear();
                }