Skip to content

Commit

Permalink
Fix stream_metadata enum -Wint-in-bool-context warning
Browse files Browse the repository at this point in the history
There is an warning in the code:
```
/incubator-kvrocks/src/storage/batch_extractor.cc:89:50: warning: enum constant in boolean context [-Wint-in-bool-context]
   89 |       StreamMetadata stream_metadata(kRedisStream);
```

This was introduced in apache#1345
  • Loading branch information
enjoy-binbin committed Mar 24, 2023
1 parent 76a80b5 commit 5bead4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/storage/batch_extractor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ rocksdb::Status WriteBatchExtractor::PutCF(uint32_t column_family_id, const Slic
if (!isSetID) {
return rocksdb::Status::OK();
}
StreamMetadata stream_metadata(kRedisStream);
StreamMetadata stream_metadata;
auto s = stream_metadata.Decode(value.ToString());
if (!s.ok()) return s;
command_args = {"XSETID",
Expand Down

0 comments on commit 5bead4b

Please sign in to comment.