diff --git a/include/mem_root_deque.h b/include/mem_root_deque.h
index fbf4b0efe49..607755ce384 100644
--- a/include/mem_root_deque.h
+++ b/include/mem_root_deque.h
@@ -379,12 +379,12 @@ class mem_root_deque {
       return *this;
     }
 
-    Iterator operator+(difference_type offset) {
+    Iterator operator+(difference_type offset) const {
       assert_not_invalidated();
       return Iterator{m_deque, m_physical_idx + offset};
     }
 
-    Iterator operator-(difference_type offset) {
+    Iterator operator-(difference_type offset) const {
       assert_not_invalidated();
       return Iterator{m_deque, m_physical_idx - offset};
     }
diff --git a/unittest/gunit/libmysqlgcs/xcom/gcs_xcom_control_interface-t.cc b/unittest/gunit/libmysqlgcs/xcom/gcs_xcom_control_interface-t.cc
index c5504d69e0f..29bb22a496b 100644
--- a/unittest/gunit/libmysqlgcs/xcom/gcs_xcom_control_interface-t.cc
+++ b/unittest/gunit/libmysqlgcs/xcom/gcs_xcom_control_interface-t.cc
@@ -1211,7 +1211,6 @@ TEST_F(XComControlTest, ViewChangedJoiningTest) {
 
   const Gcs_xcom_view_identifier &current_view_id =
       down_cast<const Gcs_xcom_view_identifier &>(current_view->get_view_id());
-  ASSERT_TRUE((&current_view_id) != nullptr);
   ASSERT_EQ(typeid(Gcs_xcom_view_identifier).name(),
             typeid(current_view_id).name());
 
diff --git a/unittest/gunit/strings_utf8-t.cc b/unittest/gunit/strings_utf8-t.cc
index 3d6daddfcf9..3d93163289b 100644
--- a/unittest/gunit/strings_utf8-t.cc
+++ b/unittest/gunit/strings_utf8-t.cc
@@ -197,7 +197,7 @@ class StringLiteral {
   size_t size;
 };
 
-StringLiteral operator"" _sl(const char *ptr, size_t size) {
+StringLiteral operator""_sl(const char *ptr, size_t size) {
   return StringLiteral(ptr, size);
 }