Commit 3d647001 authored by marko's avatar marko

branches/zip: Silence some more GCC 4.2.1 warnings.

parent 94755e4f
......@@ -3296,7 +3296,7 @@ btr_validate_level(
/* Check father node pointers */
const rec_t* node_ptr;
rec_t* node_ptr;
offsets = btr_page_get_father_block(offsets, heap, index,
block, &mtr, &node_cur);
......@@ -3379,14 +3379,17 @@ btr_validate_level(
page_get_supremum_rec(father_page)));
ut_a(btr_page_get_next(father_page, &mtr) == FIL_NULL);
} else {
const rec_t* right_node_ptr
= page_rec_get_next(node_ptr);
offsets = btr_page_get_father_block(
offsets, heap, index, right_block,
&mtr, &right_node_cur);
if (page_rec_get_next((rec_t*) node_ptr)
if (right_node_ptr
!= page_get_supremum_rec(father_page)) {
if (btr_cur_get_rec(&right_node_cur)
!= page_rec_get_next((rec_t*) node_ptr)) {
!= right_node_ptr) {
ret = FALSE;
fputs("InnoDB: node pointer to"
" the right page is wrong\n",
......
......@@ -383,6 +383,7 @@ rec_offs_validate(
const dict_index_t* index, /* in: record descriptor or NULL */
const ulint* offsets);/* in: array returned by
rec_get_offsets() */
#ifdef UNIV_DEBUG
/****************************************************************
Updates debug data in offsets, in order to avoid bogus
rec_offs_validate() failures. */
......@@ -394,6 +395,9 @@ rec_offs_make_valid(
const dict_index_t* index, /* in: record descriptor */
ulint* offsets);/* in: array returned by
rec_get_offsets() */
#else
# define rec_offs_make_valid(rec, index, offsets) ((void) 0)
#endif /* UNIV_DEBUG */
/****************************************************************
The following function is used to get the offset to the nth
......
......@@ -974,6 +974,7 @@ rec_offs_validate(
}
return(TRUE);
}
#ifdef UNIV_DEBUG
/****************************************************************
Updates debug data in offsets, in order to avoid bogus
rec_offs_validate() failures. */
......@@ -981,22 +982,19 @@ UNIV_INLINE
void
rec_offs_make_valid(
/*================*/
const rec_t* rec __attribute__((unused)),
/* in: record */
const dict_index_t* index __attribute__((unused)),
/* in: record descriptor */
ulint* offsets __attribute__((unused)))
/* in: array returned by rec_get_offsets() */
const rec_t* rec, /* in: record */
const dict_index_t* index, /* in: record descriptor */
ulint* offsets)/* in: array returned by
rec_get_offsets() */
{
ut_ad(rec);
ut_ad(index);
ut_ad(offsets);
#ifdef UNIV_DEBUG
ut_ad(rec_get_n_fields(rec, index) >= rec_offs_n_fields(offsets));
offsets[2] = (ulint) rec;
offsets[3] = (ulint) index;
#endif /* UNIV_DEBUG */
}
#endif /* UNIV_DEBUG */
/****************************************************************
The following function is used to get an offset to the nth
......
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