From 4387e3a13bba61313a1637f63253e01e6edbce0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 12 Aug 2020 13:08:17 +0300 Subject: [PATCH] Use DBUG_ASSERT(ptr != NULL) to ease merging to 10.3 In 10.3, DBUG_ASSERT() may expand to something that includes __builtin_expect(), which expects integer arguments, not pointers. To avoid any compiler warnings, let us use an explicit rather than implicit comparison to the null pointer. --- include/ilist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ilist.h b/include/ilist.h index dc75d6907ce..ed1d978a0d6 100644 --- a/include/ilist.h +++ b/include/ilist.h @@ -71,12 +71,12 @@ public: typedef T *pointer; typedef T &reference; - Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_); } + Iterator(ListNode *node) : node_(node) { DBUG_ASSERT(node_ != NULL); } Iterator &operator++() { node_= node_->next; - DBUG_ASSERT(node_); + DBUG_ASSERT(node_ != NULL); return *this; } Iterator operator++(int)