Commit 126a581b authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent 88106ef3
......@@ -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 "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment