summaryrefslogtreecommitdiff
path: root/storage/innobase/page
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-09-14 08:00:28 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-09-14 08:00:28 +0300
commit126a581b4585f707eb165aa250e58bbeada480d7 (patch)
treeafb593ae25f939c7fa54325c0ee1a628cdde07a6 /storage/innobase/page
parent88106ef3529ac908d9adf88242722752f11b59a2 (diff)
downloadmariadb-git-126a581b4585f707eb165aa250e58bbeada480d7.tar.gz
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.
Diffstat (limited to 'storage/innobase/page')
-rw-r--r--storage/innobase/page/page0page.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc
index 3765f8112a1..0a2f11ff3b0 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 "