Fix build error due to uninitialized read_req (#10312)

Summary:
GCC-12 has strick check on variables, and thus
build fails when it finds read_req is not properly
initialized (-Werror=maybe-uninitialized). Add
default value to fix this.

Change-Id: Ib8a9085e2d613ee7b943b58a6a58e1bc351725d7
Signed-off-by: Jun He <jun.he@arm.com>

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10312

Reviewed By: riversand963

Differential Revision: D37656997

Pulled By: ajkr

fbshipit-source-id: fe47492c913b34b3a03c04beeec9ec57831dcaff
main
Jun He 2 years ago committed by Facebook GitHub Bot
parent 8885b0537b
commit 5cf18c7634
  1. 2
      db/blob/blob_file_reader.cc

@ -414,7 +414,7 @@ void BlobFileReader::MultiGetBlob(const ReadOptions& read_options,
assert(blob_reqs[i]->offset >= adjustment);
adjustments.push_back(adjustment);
FSReadRequest read_req;
FSReadRequest read_req = {};
read_req.offset = blob_reqs[i]->offset - adjustment;
read_req.len = blob_reqs[i]->len + adjustment;
read_reqs.emplace_back(read_req);

Loading…
Cancel
Save