Skip to content

Commit

Permalink
Fix -Wunused-but-set-variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Dec 8, 2020
1 parent f0c295e commit ea21d63
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions storage/innobase/buf/buf0flu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -883,22 +883,31 @@ static bool buf_flush_page(buf_page_t *bpage, bool lru, fil_space_t *space)
{
space->reacquire();
ut_ad(status == buf_page_t::NORMAL || status == buf_page_t::INIT_ON_FLUSH);
size_t size, orig_size;
size_t size;
#if defined HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE || defined _WIN32
size_t orig_size;
#endif
IORequest::Type type= lru ? IORequest::WRITE_LRU : IORequest::WRITE_ASYNC;

if (UNIV_UNLIKELY(!rw_lock)) /* ROW_FORMAT=COMPRESSED */
{
ut_ad(!space->full_crc32());
ut_ad(!space->is_compressed()); /* not page_compressed */
orig_size= size= bpage->zip_size();
size= bpage->zip_size();
#if defined HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE || defined _WIN32
orig_size= size;
#endif
buf_flush_update_zip_checksum(frame, size);
frame= buf_page_encrypt(space, bpage, frame, &size);
ut_ad(size == bpage->zip_size());
}
else
{
byte *page= block->frame;
orig_size= size= block->physical_size();
size= block->physical_size();
#if defined HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE || defined _WIN32
orig_size= size;
#endif

if (space->full_crc32())
{
Expand Down

0 comments on commit ea21d63

Please sign in to comment.