This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a1ce1b02 [tablet] fix compilation warnings
4a1ce1b02 is described below

commit 4a1ce1b0225d3416dcd753b915c3f4b3d65056e5
Author: Alexey Serbin <[email protected]>
AuthorDate: Tue Oct 24 19:15:18 2023 -0700

    [tablet] fix compilation warnings
    
    This patch fixes the following compilation warnings on macOS:
    
    -----
      src/kudu/tablet/compaction-test.cc:281:53: warning: format specifies type 
'long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
          snprintf(keybuf, sizeof(keybuf), kRowKeyFormat, row_key);
    
    -----
      src/kudu/tablet/ops/op_driver.cc:82:16: warning: 'OpCompleted' overrides 
a member function but is not marked 'override' [-Winconsistent-missing-override]
        virtual void OpCompleted() {
                     ^
      src/kudu/tablet/ops/op.h:338:16: note: overridden virtual function is here
        virtual void OpCompleted();
                     ^
    
    Change-Id: I481c5bb3e83575c3bfe24a31ff077bd528f17e48
    Reviewed-on: http://gerrit.cloudera.org:8080/20619
    Tested-by: Kudu Jenkins
    Reviewed-by: Yifan Zhang <[email protected]>
    Reviewed-by: Mahesh Reddy <[email protected]>
---
 src/kudu/tablet/compaction-test.cc | 3 ++-
 src/kudu/tablet/ops/op_driver.cc   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/kudu/tablet/compaction-test.cc 
b/src/kudu/tablet/compaction-test.cc
index b1856d83b..a59db8d7d 100644
--- a/src/kudu/tablet/compaction-test.cc
+++ b/src/kudu/tablet/compaction-test.cc
@@ -18,6 +18,7 @@
 #include "kudu/tablet/compaction.h"
 
 #include <algorithm>
+#include <cinttypes>
 #include <cstdint>
 #include <cstdio>
 #include <cstdlib>
@@ -107,7 +108,7 @@ namespace tablet {
 
 class RowSetMetadata;
 
-constexpr const char* const kRowKeyFormat = "hello %010ld";
+constexpr const char* const kRowKeyFormat = "hello %010" PRId64;
 constexpr const size_t kLargeRollThreshold = 8UL * 1024 * 1024 * 1024;  // 8GB
 constexpr const size_t kSmallRollThreshold = 1024; // 1KB
 
diff --git a/src/kudu/tablet/ops/op_driver.cc b/src/kudu/tablet/ops/op_driver.cc
index b4edefac6..2f4b372d4 100644
--- a/src/kudu/tablet/ops/op_driver.cc
+++ b/src/kudu/tablet/ops/op_driver.cc
@@ -79,7 +79,7 @@ class FollowerOpCompletionCallback : public 
OpCompletionCallback {
         response_(response),
         result_tracker_(std::move(result_tracker)) {}
 
-  virtual void OpCompleted() {
+  void OpCompleted() override {
     if (status_.ok()) {
       result_tracker_->RecordCompletionAndRespond(request_id_, response_);
     } else {

Reply via email to