From 5400800a56bdf63b3887e323840c8534abdd0b72 Mon Sep 17 00:00:00 2001 From: Fosco Marotto Date: Wed, 31 Jan 2018 11:50:59 -0800 Subject: [PATCH] Work around VS2017 warning for unused reference Summary: For #3407 Closes https://github.com/facebook/rocksdb/pull/3425 Differential Revision: D6836900 Pulled By: gfosco fbshipit-source-id: 7bcaf7a1beeeeabb7c05584f2745e7b4a2473497 --- db/column_family.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/column_family.cc b/db/column_family.cc index 8e4b2103d..2be22bd86 100644 --- a/db/column_family.cc +++ b/db/column_family.cc @@ -1060,11 +1060,13 @@ ColumnFamilySet::~ColumnFamilySet() { while (column_family_data_.size() > 0) { // cfd destructor will delete itself from column_family_data_ auto cfd = column_family_data_.begin()->second; - bool last_ref __attribute__((__unused__)) = cfd->Unref(); + bool last_ref __attribute__((__unused__)); + last_ref = cfd->Unref(); assert(last_ref); delete cfd; } - bool dummy_last_ref __attribute__((__unused__)) = dummy_cfd_->Unref(); + bool dummy_last_ref __attribute__((__unused__)); + dummy_last_ref = dummy_cfd_->Unref(); assert(dummy_last_ref); delete dummy_cfd_; }