From owner-svn-ports-head@freebsd.org Mon Sep 28 14:24:10 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DBECA0A772; Mon, 28 Sep 2015 14:24:10 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F36E21BAE; Mon, 28 Sep 2015 14:24:09 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8SEO9Pe017287; Mon, 28 Sep 2015 14:24:09 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8SEO8tu017281; Mon, 28 Sep 2015 14:24:08 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201509281424.t8SEO8tu017281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Mon, 28 Sep 2015 14:24:08 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r398116 - head/databases/rocksdb/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2015 14:24:10 -0000 Author: sunpoet Date: Mon Sep 28 14:24:08 2015 New Revision: 398116 URL: https://svnweb.freebsd.org/changeset/ports/398116 Log: - Fix warning generated by recent snapshot of Clang 3.7.0, including: - Pessimizing std::move() invocations in a number of places. PR: 203154 Submitted by: dim Added: head/databases/rocksdb/files/patch-db-db_bench.cc (contents, props changed) head/databases/rocksdb/files/patch-db-wal_manager.cc (contents, props changed) head/databases/rocksdb/files/patch-utilities-backupable-backupable_db.cc (contents, props changed) head/databases/rocksdb/files/patch-utilities-document-json_document.cc (contents, props changed) Added: head/databases/rocksdb/files/patch-db-db_bench.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/rocksdb/files/patch-db-db_bench.cc Mon Sep 28 14:24:08 2015 (r398116) @@ -0,0 +1,21 @@ +--- db/db_bench.cc.orig 2015-08-31 20:23:39.000000000 +0200 ++++ db/db_bench.cc 2015-09-08 00:15:47.039650000 +0200 +@@ -2259,8 +2259,7 @@ class Benchmark { + fprintf(stderr, "Open flash device failed\n"); + exit(1); + } +- flashcache_aware_env_ = +- std::move(NewFlashcacheAwareEnv(FLAGS_env, cachedev_fd_)); ++ flashcache_aware_env_ = NewFlashcacheAwareEnv(FLAGS_env, cachedev_fd_); + if (flashcache_aware_env_.get() == nullptr) { + fprintf(stderr, "Failed to open flashcahce device at %s\n", + FLAGS_flashcache_dev.c_str()); +@@ -2884,7 +2883,7 @@ class Benchmark { + std::vector > key_guards; + std::vector values(entries_per_batch_); + while (static_cast(keys.size()) < entries_per_batch_) { +- key_guards.push_back(std::move(std::unique_ptr())); ++ key_guards.push_back(std::unique_ptr()); + keys.push_back(AllocateKey(&key_guards.back())); + } + Added: head/databases/rocksdb/files/patch-db-wal_manager.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/rocksdb/files/patch-db-wal_manager.cc Mon Sep 28 14:24:08 2015 (r398116) @@ -0,0 +1,13 @@ +--- db/wal_manager.cc.orig 2015-08-31 20:23:39.000000000 +0200 ++++ db/wal_manager.cc 2015-09-07 23:52:03.849468000 +0200 +@@ -329,8 +329,8 @@ Status WalManager::GetSortedWalsOfType(c + return s; + } + +- log_files.push_back(std::move(std::unique_ptr( +- new LogFileImpl(number, log_type, sequence, size_bytes)))); ++ log_files.push_back(std::unique_ptr( ++ new LogFileImpl(number, log_type, sequence, size_bytes))); + } + } + CompareLogByPointer compare_log_files; Added: head/databases/rocksdb/files/patch-utilities-backupable-backupable_db.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/rocksdb/files/patch-utilities-backupable-backupable_db.cc Mon Sep 28 14:24:08 2015 (r398116) @@ -0,0 +1,28 @@ +--- utilities/backupable/backupable_db.cc.orig 2015-08-31 20:23:39.000000000 +0200 ++++ utilities/backupable/backupable_db.cc 2015-09-08 00:08:37.375425000 +0200 +@@ -560,10 +560,10 @@ Status BackupEngineImpl::Initialize() { + continue; + } + assert(backups_.find(backup_id) == backups_.end()); +- backups_.insert(std::move( ++ backups_.insert( + std::make_pair(backup_id, unique_ptr(new BackupMeta( + GetBackupMetaFile(backup_id), +- &backuped_file_infos_, backup_env_))))); ++ &backuped_file_infos_, backup_env_)))); + } + + if (options_.destroy_old_data) { // Destroy old data +@@ -701,10 +701,10 @@ Status BackupEngineImpl::CreateNewBackup + + BackupID new_backup_id = latest_backup_id_ + 1; + assert(backups_.find(new_backup_id) == backups_.end()); +- auto ret = backups_.insert(std::move( ++ auto ret = backups_.insert( + std::make_pair(new_backup_id, unique_ptr(new BackupMeta( + GetBackupMetaFile(new_backup_id), +- &backuped_file_infos_, backup_env_))))); ++ &backuped_file_infos_, backup_env_)))); + assert(ret.second == true); + auto& new_backup = ret.first->second; + new_backup->RecordTimestamp(); Added: head/databases/rocksdb/files/patch-utilities-document-json_document.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/rocksdb/files/patch-utilities-document-json_document.cc Mon Sep 28 14:24:08 2015 (r398116) @@ -0,0 +1,20 @@ +--- utilities/document/json_document.cc.orig 2015-08-31 20:23:39.000000000 +0200 ++++ utilities/document/json_document.cc 2015-09-08 00:10:06.250157000 +0200 +@@ -307,7 +307,7 @@ JSONDocument JSONDocument::operator[](co + assert(foundValue != nullptr); + // No need to save paths in const objects + JSONDocument ans(foundValue, false); +- return std::move(ans); ++ return ans; + } + + size_t JSONDocument::Count() const { +@@ -330,7 +330,7 @@ JSONDocument JSONDocument::operator[](si + auto arrayVal = reinterpret_cast(value_); + auto foundValue = arrayVal->get(static_cast(i)); + JSONDocument ans(foundValue, false); +- return std::move(ans); ++ return ans; + } + + bool JSONDocument::IsNull() const {