Fix some shadow warning (#6242)
Summary: Some shadow warning shows up when using gcc 4.8. An example: ./utilities/blob_db/blob_compaction_filter.h: In constructor ‘rocksdb::blob_db::BlobIndexCompactionFilterFactoryBase::BlobIndexCompactionFilterFactoryBase(rocksdb::blob_db::lobDBImpl*, rocksdb::Env*, rocksdb::Statistics*)’: ./utilities/blob_db/blob_compaction_filter.h:121:7: error: declaration of ‘blob_db_impl’ shadows a member of 'this' [-Werror=shadow] : blob_db_impl_(blob_db_impl), env_(_env), statistics_(_statistics) {} ^ Fix them. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6242 Test Plan: Build and see the warnings go away. Differential Revision: D19217789 fbshipit-source-id: 8ef631941f23dab47a388e060adec24b72efd65e
This commit is contained in:
parent
cfd9732f65
commit
39410bcb3d
9
env/composite_env_wrapper.h
vendored
9
env/composite_env_wrapper.h
vendored
@ -627,8 +627,9 @@ class CompositeEnvWrapper : public Env {
|
|||||||
|
|
||||||
class LegacySequentialFileWrapper : public FSSequentialFile {
|
class LegacySequentialFileWrapper : public FSSequentialFile {
|
||||||
public:
|
public:
|
||||||
explicit LegacySequentialFileWrapper(std::unique_ptr<SequentialFile>&& target)
|
explicit LegacySequentialFileWrapper(
|
||||||
: target_(std::move(target)) {}
|
std::unique_ptr<SequentialFile>&& _target)
|
||||||
|
: target_(std::move(_target)) {}
|
||||||
|
|
||||||
IOStatus Read(size_t n, const IOOptions& /*options*/, Slice* result,
|
IOStatus Read(size_t n, const IOOptions& /*options*/, Slice* result,
|
||||||
char* scratch, IODebugContext* /*dbg*/) override {
|
char* scratch, IODebugContext* /*dbg*/) override {
|
||||||
@ -716,8 +717,8 @@ class LegacyRandomAccessFileWrapper : public FSRandomAccessFile {
|
|||||||
|
|
||||||
class LegacyWritableFileWrapper : public FSWritableFile {
|
class LegacyWritableFileWrapper : public FSWritableFile {
|
||||||
public:
|
public:
|
||||||
explicit LegacyWritableFileWrapper(std::unique_ptr<WritableFile>&& target)
|
explicit LegacyWritableFileWrapper(std::unique_ptr<WritableFile>&& _target)
|
||||||
: target_(std::move(target)) {}
|
: target_(std::move(_target)) {}
|
||||||
|
|
||||||
IOStatus Append(const Slice& data, const IOOptions& /*options*/,
|
IOStatus Append(const Slice& data, const IOOptions& /*options*/,
|
||||||
IODebugContext* /*dbg*/) override {
|
IODebugContext* /*dbg*/) override {
|
||||||
|
@ -116,9 +116,9 @@ class BlobIndexCompactionFilterGC : public BlobIndexCompactionFilterBase {
|
|||||||
// that creates non-GC filters.
|
// that creates non-GC filters.
|
||||||
class BlobIndexCompactionFilterFactoryBase : public CompactionFilterFactory {
|
class BlobIndexCompactionFilterFactoryBase : public CompactionFilterFactory {
|
||||||
public:
|
public:
|
||||||
BlobIndexCompactionFilterFactoryBase(BlobDBImpl* blob_db_impl, Env* env,
|
BlobIndexCompactionFilterFactoryBase(BlobDBImpl* _blob_db_impl, Env* _env,
|
||||||
Statistics* statistics)
|
Statistics* _statistics)
|
||||||
: blob_db_impl_(blob_db_impl), env_(env), statistics_(statistics) {}
|
: blob_db_impl_(_blob_db_impl), env_(_env), statistics_(_statistics) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BlobDBImpl* blob_db_impl() const { return blob_db_impl_; }
|
BlobDBImpl* blob_db_impl() const { return blob_db_impl_; }
|
||||||
@ -134,9 +134,10 @@ class BlobIndexCompactionFilterFactoryBase : public CompactionFilterFactory {
|
|||||||
class BlobIndexCompactionFilterFactory
|
class BlobIndexCompactionFilterFactory
|
||||||
: public BlobIndexCompactionFilterFactoryBase {
|
: public BlobIndexCompactionFilterFactoryBase {
|
||||||
public:
|
public:
|
||||||
BlobIndexCompactionFilterFactory(BlobDBImpl* blob_db_impl, Env* env,
|
BlobIndexCompactionFilterFactory(BlobDBImpl* _blob_db_impl, Env* _env,
|
||||||
Statistics* statistics)
|
Statistics* _statistics)
|
||||||
: BlobIndexCompactionFilterFactoryBase(blob_db_impl, env, statistics) {}
|
: BlobIndexCompactionFilterFactoryBase(_blob_db_impl, _env, _statistics) {
|
||||||
|
}
|
||||||
|
|
||||||
const char* Name() const override {
|
const char* Name() const override {
|
||||||
return "BlobIndexCompactionFilterFactory";
|
return "BlobIndexCompactionFilterFactory";
|
||||||
@ -149,9 +150,10 @@ class BlobIndexCompactionFilterFactory
|
|||||||
class BlobIndexCompactionFilterFactoryGC
|
class BlobIndexCompactionFilterFactoryGC
|
||||||
: public BlobIndexCompactionFilterFactoryBase {
|
: public BlobIndexCompactionFilterFactoryBase {
|
||||||
public:
|
public:
|
||||||
BlobIndexCompactionFilterFactoryGC(BlobDBImpl* blob_db_impl, Env* env,
|
BlobIndexCompactionFilterFactoryGC(BlobDBImpl* _blob_db_impl, Env* _env,
|
||||||
Statistics* statistics)
|
Statistics* _statistics)
|
||||||
: BlobIndexCompactionFilterFactoryBase(blob_db_impl, env, statistics) {}
|
: BlobIndexCompactionFilterFactoryBase(_blob_db_impl, _env, _statistics) {
|
||||||
|
}
|
||||||
|
|
||||||
const char* Name() const override {
|
const char* Name() const override {
|
||||||
return "BlobIndexCompactionFilterFactoryGC";
|
return "BlobIndexCompactionFilterFactoryGC";
|
||||||
|
Loading…
Reference in New Issue
Block a user