From 126a581b4585f707eb165aa250e58bbeada480d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 14 Sep 2017 08:00:28 +0300 Subject: [PATCH] Fix warnings for page_header_get_field() comparisons The type uint16_t is apparently promoted to int in a comparison, causing a sign mismatch when comparing to ulint. Convert to ulint before comparison. --- storage/innobase/page/page0page.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc index 3765f8112a170..0a2f11ff3b02c 100644 --- a/storage/innobase/page/page0page.cc +++ b/storage/innobase/page/page0page.cc @@ -2117,7 +2117,7 @@ page_simple_validate_old( goto func_exit; } - if (UNIV_UNLIKELY(page_header_get_field(page, PAGE_N_RECS) + if (UNIV_UNLIKELY(ulint(page_header_get_field(page, PAGE_N_RECS)) + PAGE_HEAP_NO_USER_LOW != count + 1)) { ib::error() << "n recs wrong " @@ -2308,7 +2308,7 @@ page_simple_validate_new( goto func_exit; } - if (UNIV_UNLIKELY(page_header_get_field(page, PAGE_N_RECS) + if (UNIV_UNLIKELY(ulint(page_header_get_field(page, PAGE_N_RECS)) + PAGE_HEAP_NO_USER_LOW != count + 1)) { ib::error() << "n recs wrong "