summarylogtreecommitdiffstats
path: root/fix-compile-warnings-treated-as-errors-for-gcc9.patch
diff options
context:
space:
mode:
authorTony Lambiris2019-08-05 08:48:48 -0400
committerTony Lambiris2019-08-05 08:48:48 -0400
commit1106ef44b23f399c4ca3c9cfec259df9f425e4db (patch)
treee5bf8e4bc7a6fa7bc5023eff37c7afac77f30873 /fix-compile-warnings-treated-as-errors-for-gcc9.patch
parentff5ae6ab185ba92eeb6daa188a8c320e74965fb1 (diff)
downloadaur-1106ef44b23f399c4ca3c9cfec259df9f425e4db.tar.gz
Bump version, fix builds with gcc 9
Diffstat (limited to 'fix-compile-warnings-treated-as-errors-for-gcc9.patch')
-rw-r--r--fix-compile-warnings-treated-as-errors-for-gcc9.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/fix-compile-warnings-treated-as-errors-for-gcc9.patch b/fix-compile-warnings-treated-as-errors-for-gcc9.patch
new file mode 100644
index 000000000000..2bdbcd4a6bed
--- /dev/null
+++ b/fix-compile-warnings-treated-as-errors-for-gcc9.patch
@@ -0,0 +1,59 @@
+diff --git a/db/internal_stats.h b/db/internal_stats.h
+index 20fb07f485..ebe90d574d 100644
+--- a/db/internal_stats.h
++++ b/db/internal_stats.h
+@@ -237,6 +237,28 @@ class InternalStats {
+ }
+ }
+
++ CompactionStats& operator=(const CompactionStats& c) {
++ micros = c.micros;
++ cpu_micros = c.cpu_micros;
++ bytes_read_non_output_levels = c.bytes_read_non_output_levels;
++ bytes_read_output_level = c.bytes_read_output_level;
++ bytes_written = c.bytes_written;
++ bytes_moved = c.bytes_moved;
++ num_input_files_in_non_output_levels =
++ c.num_input_files_in_non_output_levels;
++ num_input_files_in_output_level = c.num_input_files_in_output_level;
++ num_output_files = c.num_output_files;
++ num_input_records = c.num_input_records;
++ num_dropped_records = c.num_dropped_records;
++ count = c.count;
++
++ int num_of_reasons = static_cast<int>(CompactionReason::kNumOfReasons);
++ for (int i = 0; i < num_of_reasons; i++) {
++ counts[i] = c.counts[i];
++ }
++ return *this;
++ }
++
+ void Clear() {
+ this->micros = 0;
+ this->cpu_micros = 0;
+diff --git a/db/version_edit.h b/db/version_edit.h
+index e1857b37fc..4a93db34e1 100644
+--- a/db/version_edit.h
++++ b/db/version_edit.h
+@@ -52,6 +52,8 @@ struct FileDescriptor {
+ smallest_seqno(_smallest_seqno),
+ largest_seqno(_largest_seqno) {}
+
++ FileDescriptor(const FileDescriptor& fd) { *this=fd; }
++
+ FileDescriptor& operator=(const FileDescriptor& fd) {
+ table_reader = fd.table_reader;
+ packed_number_and_path_id = fd.packed_number_and_path_id;
+diff --git a/utilities/persistent_cache/persistent_cache_util.h b/utilities/persistent_cache/persistent_cache_util.h
+index 214bb5875d..254c038f98 100644
+--- a/utilities/persistent_cache/persistent_cache_util.h
++++ b/utilities/persistent_cache/persistent_cache_util.h
+@@ -48,7 +48,7 @@ class BoundedQueue {
+ T t = std::move(q_.front());
+ size_ -= t.Size();
+ q_.pop_front();
+- return std::move(t);
++ return t;
+ }
+
+ size_t Size() const {