summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-13 18:48:41 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-13 18:48:41 +0300
commit2f7b37b02154748b223e385a7d7787900ab37b5e (patch)
tree49a5ab1928bd840c129bd14ce72c5cf2c0190e20 /include
parent7f03b1d78f2aab738e38a1e33ac887757604585a (diff)
parentb811c6ecc74cc1421eedc92573447768d1eb7980 (diff)
downloadmariadb-git-2f7b37b02154748b223e385a7d7787900ab37b5e.tar.gz
Merge 10.3 into 10.4, except MDEV-22543
Also, fix GCC -Og -Wmaybe-uninitialized in run_backup_stage()
Diffstat (limited to 'include')
-rw-r--r--include/ilist.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/ilist.h b/include/ilist.h
index 822f0334022..6e7219937dd 100644
--- a/include/ilist.h
+++ b/include/ilist.h
@@ -19,6 +19,8 @@
#ifndef ILIST_H
#define ILIST_H
+#include "my_dbug.h"
+
#include <cstddef>
#include <iterator>
@@ -73,11 +75,13 @@ public:
typedef T *pointer;
typedef T &reference;
- Iterator(ListNode *node) noexcept : node_(node) {}
+ Iterator(ListNode *node) noexcept : node_(node)
+ { DBUG_ASSERT(node_ != nullptr); }
Iterator &operator++() noexcept
{
node_= node_->next;
+ DBUG_ASSERT(node_ != nullptr);
return *this;
}
Iterator operator++(int) noexcept
@@ -90,6 +94,7 @@ public:
Iterator &operator--() noexcept
{
node_= node_->prev;
+ DBUG_ASSERT(node_);
return *this;
}
Iterator operator--(int) noexcept
@@ -184,8 +189,8 @@ public:
#ifndef DBUG_OFF
ListNode *curr= pos.node_;
- curr->prev= NULL;
- curr->next= NULL;
+ curr->prev= nullptr;
+ curr->next= nullptr;
#endif
return next;