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