Commit 6748a82b authored by marko's avatar marko

branches/zip: Remove GCC 4.0.4 warnings from

make AM_CFLAGS='-std=c89 -Wall -W -pedantic'
parent 8f167973
...@@ -1087,8 +1087,8 @@ btr_root_raise_and_insert( ...@@ -1087,8 +1087,8 @@ btr_root_raise_and_insert(
if (UNIV_UNLIKELY(!page_copy_rec_list_end(new_page, new_page_zip, if (UNIV_UNLIKELY(!page_copy_rec_list_end(new_page, new_page_zip,
page_get_infimum_rec(root), cursor->index, mtr))) { page_get_infimum_rec(root), cursor->index, mtr))) {
ut_a(new_page_zip);
byte page_no[4]; byte page_no[4];
ut_a(new_page_zip);
/* Copy the pages byte for byte and restore the page offset. /* Copy the pages byte for byte and restore the page offset.
This cannot fail, because the compressed page This cannot fail, because the compressed page
......
...@@ -1959,6 +1959,9 @@ buf_page_io_complete( ...@@ -1959,6 +1959,9 @@ buf_page_io_complete(
io_type = block->io_fix; io_type = block->io_fix;
if (io_type == BUF_IO_READ) { if (io_type == BUF_IO_READ) {
ulint read_page_no;
ulint read_space_id;
if (block->page_zip.size) { if (block->page_zip.size) {
ut_a(block->space); ut_a(block->space);
...@@ -1977,10 +1980,10 @@ buf_page_io_complete( ...@@ -1977,10 +1980,10 @@ buf_page_io_complete(
/* If this page is not uninitialized and not in the /* If this page is not uninitialized and not in the
doublewrite buffer, then the page number and space id doublewrite buffer, then the page number and space id
should be the same as in block. */ should be the same as in block. */
ulint read_page_no = mach_read_from_4((block->frame) read_page_no = mach_read_from_4((block->frame)
+ FIL_PAGE_OFFSET); + FIL_PAGE_OFFSET);
ulint read_space_id = mach_read_from_4((block->frame) read_space_id = mach_read_from_4((block->frame)
+ FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
if (!block->space && trx_doublewrite_page_inside( if (!block->space && trx_doublewrite_page_inside(
block->offset)) { block->offset)) {
......
...@@ -269,12 +269,13 @@ rec_get_next_ptr( ...@@ -269,12 +269,13 @@ rec_get_next_ptr(
+ ut_align_offset(rec, UNIV_PAGE_SIZE) + ut_align_offset(rec, UNIV_PAGE_SIZE)
< UNIV_PAGE_SIZE); < UNIV_PAGE_SIZE);
#endif #endif
return(ut_align_down(rec, UNIV_PAGE_SIZE) return((byte*) ut_align_down(rec, UNIV_PAGE_SIZE)
+ ut_align_offset(rec + field_value, UNIV_PAGE_SIZE)); + ut_align_offset(rec + field_value, UNIV_PAGE_SIZE));
} else { } else {
ut_ad(field_value < UNIV_PAGE_SIZE); ut_ad(field_value < UNIV_PAGE_SIZE);
return(ut_align_down(rec, UNIV_PAGE_SIZE) + field_value); return((byte*) ut_align_down(rec, UNIV_PAGE_SIZE)
+ field_value);
} }
} }
...@@ -362,11 +363,11 @@ rec_set_next_offs_new( ...@@ -362,11 +363,11 @@ rec_set_next_offs_new(
rec_t* rec, /* in/out: new-style physical record */ rec_t* rec, /* in/out: new-style physical record */
ulint next) /* in: offset of the next record */ ulint next) /* in: offset of the next record */
{ {
ulint field_value;
ut_ad(rec); ut_ad(rec);
ut_ad(UNIV_PAGE_SIZE > next); ut_ad(UNIV_PAGE_SIZE > next);
ulint field_value;
if (UNIV_UNLIKELY(!next)) { if (UNIV_UNLIKELY(!next)) {
field_value = 0; field_value = 0;
} else { } else {
......
...@@ -507,7 +507,7 @@ page_zip_free( ...@@ -507,7 +507,7 @@ page_zip_free(
void* opaque __attribute__((unused)), void* opaque __attribute__((unused)),
void* address) void* address)
{ {
return(ut_free(address)); ut_free(address);
} }
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG #if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
......
...@@ -870,9 +870,10 @@ rec_set_field_extern_bits( ...@@ -870,9 +870,10 @@ rec_set_field_extern_bits(
rec_set_field_extern_bits_new(rec, index, offsets, rec_set_field_extern_bits_new(rec, index, offsets,
vec, n_fields); vec, n_fields);
} else { } else {
ut_a(!rec_get_1byte_offs_flag(rec));
ulint i; ulint i;
ut_a(!rec_get_1byte_offs_flag(rec));
for (i = 0; i < n_fields; i++) { for (i = 0; i < n_fields; i++) {
rec_set_nth_field_extern_bit_old(rec, vec[i]); rec_set_nth_field_extern_bit_old(rec, vec[i]);
if (offsets) { if (offsets) {
......
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