FreeBSD Bugzilla – Attachment 161118 Details for
Bug 203154
Fix databases/rocksdb build with clang 3.7.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix rocksdb warnings with clang 3.7.0
databases__rocksdb-fix-clang370-build-1.diff (text/plain), 9.86 KB, created by
Dimitry Andric
on 2015-09-16 12:48:04 UTC
(
hide
)
Description:
Fix rocksdb warnings with clang 3.7.0
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2015-09-16 12:48:04 UTC
Size:
9.86 KB
patch
obsolete
>Index: databases/rocksdb/files/patch-db-db_bench.cc >=================================================================== >--- databases/rocksdb/files/patch-db-db_bench.cc (revision 0) >+++ databases/rocksdb/files/patch-db-db_bench.cc (working copy) >@@ -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<std::unique_ptr<const char[]> > key_guards; >+ std::vector<std::string> values(entries_per_batch_); >+ while (static_cast<int64_t>(keys.size()) < entries_per_batch_) { >+- key_guards.push_back(std::move(std::unique_ptr<const char[]>())); >++ key_guards.push_back(std::unique_ptr<const char[]>()); >+ keys.push_back(AllocateKey(&key_guards.back())); >+ } >+ > >Property changes on: databases/rocksdb/files/patch-db-db_bench.cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: databases/rocksdb/files/patch-db-wal_manager.cc >=================================================================== >--- databases/rocksdb/files/patch-db-wal_manager.cc (revision 0) >+++ databases/rocksdb/files/patch-db-wal_manager.cc (working copy) >@@ -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<LogFile>( >+- new LogFileImpl(number, log_type, sequence, size_bytes)))); >++ log_files.push_back(std::unique_ptr<LogFile>( >++ new LogFileImpl(number, log_type, sequence, size_bytes))); >+ } >+ } >+ CompareLogByPointer compare_log_files; > >Property changes on: databases/rocksdb/files/patch-db-wal_manager.cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: databases/rocksdb/files/patch-tools-db_stress.cc >=================================================================== >--- databases/rocksdb/files/patch-tools-db_stress.cc (revision 0) >+++ databases/rocksdb/files/patch-tools-db_stress.cc (working copy) >@@ -0,0 +1,11 @@ >+--- tools/db_stress.cc.orig 2015-08-31 20:23:39.000000000 +0200 >++++ tools/db_stress.cc 2015-09-16 14:31:58.271646000 +0200 >+@@ -222,7 +222,7 @@ DEFINE_int32(set_options_one_in, 0, >+ DEFINE_int32(set_in_place_one_in, 0, >+ "With a chance of 1/N, toggle in place support option"); >+ >+-DEFINE_int64(cache_size, 2 * KB * KB * KB, >++DEFINE_int64(cache_size, static_cast<int64_t>(2) * KB * KB * KB, >+ "Number of bytes to use as a cache of uncompressed data."); >+ >+ static bool ValidateInt32Positive(const char* flagname, int32_t value) { > >Property changes on: databases/rocksdb/files/patch-tools-db_stress.cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: databases/rocksdb/files/patch-util-sst_dump_tool.cc >=================================================================== >--- databases/rocksdb/files/patch-util-sst_dump_tool.cc (revision 0) >+++ databases/rocksdb/files/patch-util-sst_dump_tool.cc (working copy) >@@ -0,0 +1,11 @@ >+--- util/sst_dump_tool.cc.orig 2015-08-31 20:23:39.000000000 +0200 >++++ util/sst_dump_tool.cc 2015-09-08 00:07:36.564981000 +0200 >+@@ -164,7 +164,7 @@ int SstFileReader::ShowAllCompressionSiz >+ compress_type.insert( >+ std::make_pair(CompressionType::kLZ4HCCompression, "kLZ4HCCompression")); >+ >+- fprintf(stdout, "Block Size: %lu\n", block_size); >++ fprintf(stdout, "Block Size: %zu\n", block_size); >+ >+ for (CompressionType i = CompressionType::kNoCompression; >+ i != CompressionType::kLZ4HCCompression; i = CompressionType(i + 1)) { > >Property changes on: databases/rocksdb/files/patch-util-sst_dump_tool.cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: databases/rocksdb/files/patch-utilities-backupable-backupable_db.cc >=================================================================== >--- databases/rocksdb/files/patch-utilities-backupable-backupable_db.cc (revision 0) >+++ databases/rocksdb/files/patch-utilities-backupable-backupable_db.cc (working copy) >@@ -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<BackupMeta>(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<BackupMeta>(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(); > >Property changes on: databases/rocksdb/files/patch-utilities-backupable-backupable_db.cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: databases/rocksdb/files/patch-utilities-checkpoint-checkpoint.cc >=================================================================== >--- databases/rocksdb/files/patch-utilities-checkpoint-checkpoint.cc (revision 0) >+++ databases/rocksdb/files/patch-utilities-checkpoint-checkpoint.cc (working copy) >@@ -0,0 +1,11 @@ >+--- utilities/checkpoint/checkpoint.cc.orig 2015-08-31 20:23:39.000000000 +0200 >++++ utilities/checkpoint/checkpoint.cc 2015-09-08 00:05:26.049545000 +0200 >+@@ -131,7 +131,7 @@ Status CheckpointImpl::CreateCheckpoint( >+ (type == kDescriptorFile) ? manifest_file_size : 0); >+ } >+ } >+- Log(db_->GetOptions().info_log, "Number of log files %ld", >++ Log(db_->GetOptions().info_log, "Number of log files %zu", >+ live_wal_files.size()); >+ >+ // Link WAL files. Copy exact size of last one because it is the only one > >Property changes on: databases/rocksdb/files/patch-utilities-checkpoint-checkpoint.cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: databases/rocksdb/files/patch-utilities-document-json_document.cc >=================================================================== >--- databases/rocksdb/files/patch-utilities-document-json_document.cc (revision 0) >+++ databases/rocksdb/files/patch-utilities-document-json_document.cc (working copy) >@@ -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<fbson::ArrayVal*>(value_); >+ auto foundValue = arrayVal->get(static_cast<int>(i)); >+ JSONDocument ans(foundValue, false); >+- return std::move(ans); >++ return ans; >+ } >+ >+ bool JSONDocument::IsNull() const { > >Property changes on: databases/rocksdb/files/patch-utilities-document-json_document.cc >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 203154
: 161118