Fix UBSan build break caused by variable not initialized

Summary: UBSan is unhappy because `cfd` is not initialized. This breaks UBSan build which in turn breaks MyRocks continuous integration with RocksDB which in turns makes me unhappy :-) Fix this.

Test Plan:
- `[p]arc diff --preview` + Sandcastle.
- Verify that `COMPILE_WITH_UBSAN=1 OPT=-g make J=1 ubsan_check` gets past the break.

Reviewers: andrewkr, hermanlee4, sdong

Reviewed By: sdong

Subscribers: andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D60117
main
Gunnar Kudrjavets 9 years ago
parent b726bf5961
commit bdb1d19a69
  1. 2
      db/repair.cc

@ -449,7 +449,7 @@ class Repairer {
AddColumnFamily(props->column_family_name, t->column_family_id);
}
}
ColumnFamilyData* cfd;
ColumnFamilyData* cfd = nullptr;
if (status.ok()) {
cfd = vset_.GetColumnFamilySet()->GetColumnFamily(t->column_family_id);
if (cfd->GetName() != props->column_family_name) {

Loading…
Cancel
Save