From 3236060592757ec84b4abcd9e617009dd68555e1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 20 Jun 2005 11:06:20 +0300 Subject: InnoDB: Remove warnings detected by GCC 4.0.0 innobase/fsp/fsp0fsp.c: Declare "first" in the scope where it is used, and add dummy return statement after ut_error to silence compiler warning. innobase/include/dyn0dyn.h: Add const qualifier to dyn_push_string(). innobase/include/dyn0dyn.ic: dyn_push_string(): Add const qualifier to str; remove intermediate assignment. innobase/include/mtr0log.h: mlog_write_string(), mlog_catenate_string(): Add const to str innobase/log/log0log.c: Eliminate variables new_oldest and do_preflush in order to avoid warnings about possibly uninitialized variables. (new_oldest will now be declared in the scope of usage, and do_preflush == (advance != 0).) innobase/log/log0recv.c: Remove warnings about uninitialized variables. Add UNIV_UNLIKELY() hints. innobase/mtr/mtr0log.c: mlog_write_string(), mlog_catenate_string(): Add const to str mlog_write_string(): Add UNIV_UNLIKELY hints to assertion-like tests innobase/row/row0sel.c: Remove warning about possibly uninitialized variable. (Always initialize *out_rec.) --- innobase/fsp/fsp0fsp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'innobase/fsp') diff --git a/innobase/fsp/fsp0fsp.c b/innobase/fsp/fsp0fsp.c index ef8e70646c6..ad4228f6797 100644 --- a/innobase/fsp/fsp0fsp.c +++ b/innobase/fsp/fsp0fsp.c @@ -2325,7 +2325,6 @@ fseg_alloc_free_page_low( dulint seg_id; ulint used; ulint reserved; - fil_addr_t first; xdes_t* descr; /* extent of the hinted page */ ulint ret_page; /* the allocated page offset, FIL_NULL if could not be allocated */ @@ -2428,6 +2427,8 @@ fseg_alloc_free_page_low( } else if (reserved - used > 0) { /* 5. We take any unused page from the segment ==============================================*/ + fil_addr_t first; + if (flst_get_len(seg_inode + FSEG_NOT_FULL, mtr) > 0) { first = flst_get_first(seg_inode + FSEG_NOT_FULL, mtr); @@ -2435,6 +2436,7 @@ fseg_alloc_free_page_low( first = flst_get_first(seg_inode + FSEG_FREE, mtr); } else { ut_error; + return(FIL_NULL); } ret_descr = xdes_lst_get_descriptor(space, first, mtr); -- cgit v1.2.1