Commit 95420b94 authored by unknown's avatar unknown

fix for non-debug compilation errors.

Note that non-debug build fails in log handler functions, mail sent.


storage/maria/ma_blockrec.c:
  fix for compiler warning
storage/maria/ma_checkpoint.c:
  Debug build does not catch this situation
  static int f();
  ...
  f(2);
  ...
  static int f(int a, int b);
  Maybe this is because it believes the declaration is K&R. Non-debug
  build catches it. Adding (void) as an habit to avoid such errors.
storage/maria/ma_checkpoint.h:
  adding (void)
storage/maria/ma_recovery.c:
  adding (void)
storage/maria/ma_recovery.h:
  adding (void)
parent be382b42
...@@ -304,7 +304,9 @@ static my_bool delete_tails(MARIA_HA *info, MARIA_RECORD_POS *tails); ...@@ -304,7 +304,9 @@ static my_bool delete_tails(MARIA_HA *info, MARIA_RECORD_POS *tails);
static my_bool delete_head_or_tail(MARIA_HA *info, static my_bool delete_head_or_tail(MARIA_HA *info,
ulonglong page, uint record_number, ulonglong page, uint record_number,
my_bool head, my_bool from_update); my_bool head, my_bool from_update);
#ifndef DBUG_OFF
static void _ma_print_directory(uchar *buff, uint block_size); static void _ma_print_directory(uchar *buff, uint block_size);
#endif
static void compact_page(uchar *buff, uint block_size, uint rownr, static void compact_page(uchar *buff, uint block_size, uint rownr,
my_bool extend_block); my_bool extend_block);
static uchar *store_page_range(uchar *to, MARIA_BITMAP_BLOCK *block, static uchar *store_page_range(uchar *to, MARIA_BITMAP_BLOCK *block,
......
...@@ -99,9 +99,9 @@ static int filter_flush_data_file_indirect(enum pagecache_page_type type, ...@@ -99,9 +99,9 @@ static int filter_flush_data_file_indirect(enum pagecache_page_type type,
static int filter_flush_data_file_evenly(enum pagecache_page_type type, static int filter_flush_data_file_evenly(enum pagecache_page_type type,
pgcache_page_no_t pageno, pgcache_page_no_t pageno,
LSN rec_lsn, void *arg); LSN rec_lsn, void *arg);
static int really_execute_checkpoint(); static int really_execute_checkpoint(void);
pthread_handler_t ma_checkpoint_background(void *arg); pthread_handler_t ma_checkpoint_background(void *arg);
static int collect_tables(); static int collect_tables(LEX_STRING *str, LSN checkpoint_start_log_horizon);
/** /**
@brief Does a checkpoint @brief Does a checkpoint
...@@ -171,7 +171,7 @@ end: ...@@ -171,7 +171,7 @@ end:
@retval !=0 error @retval !=0 error
*/ */
static int really_execute_checkpoint() static int really_execute_checkpoint(void)
{ {
uint i, error= 0; uint i, error= 0;
/** @brief checkpoint_start_log_horizon will be stored there */ /** @brief checkpoint_start_log_horizon will be stored there */
...@@ -223,7 +223,8 @@ static int really_execute_checkpoint() ...@@ -223,7 +223,8 @@ static int really_execute_checkpoint()
/* STEP 3: fetch information about table files */ /* STEP 3: fetch information about table files */
if (unlikely(collect_tables(&record_pieces[2]))) if (unlikely(collect_tables(&record_pieces[2],
checkpoint_start_log_horizon)))
goto err; goto err;
...@@ -366,7 +367,7 @@ int ma_checkpoint_init(my_bool create_background_thread) ...@@ -366,7 +367,7 @@ int ma_checkpoint_init(my_bool create_background_thread)
@brief Destroys the checkpoint module @brief Destroys the checkpoint module
*/ */
void ma_checkpoint_end() void ma_checkpoint_end(void)
{ {
DBUG_ENTER("ma_checkpoint_end"); DBUG_ENTER("ma_checkpoint_end");
if (checkpoint_inited) if (checkpoint_inited)
......
...@@ -33,7 +33,7 @@ typedef enum enum_ma_checkpoint_level { ...@@ -33,7 +33,7 @@ typedef enum enum_ma_checkpoint_level {
C_MODE_START C_MODE_START
int ma_checkpoint_init(my_bool create_background_thread); int ma_checkpoint_init(my_bool create_background_thread);
void ma_checkpoint_end(); void ma_checkpoint_end(void);
int ma_checkpoint_execute(CHECKPOINT_LEVEL level, my_bool no_wait); int ma_checkpoint_execute(CHECKPOINT_LEVEL level, my_bool no_wait);
C_MODE_END C_MODE_END
......
...@@ -104,7 +104,7 @@ static int new_table(uint16 sid, const char *name, ...@@ -104,7 +104,7 @@ static int new_table(uint16 sid, const char *name,
LSN lsn_of_file_id); LSN lsn_of_file_id);
static int new_page(File fileid, pgcache_page_no_t pageid, LSN rec_lsn, static int new_page(File fileid, pgcache_page_no_t pageid, LSN rec_lsn,
struct st_dirty_page *dirty_page); struct st_dirty_page *dirty_page);
static int close_all_tables(); static int close_all_tables(void);
/** @brief global [out] buffer for translog_read_record(); never shrinks */ /** @brief global [out] buffer for translog_read_record(); never shrinks */
static LEX_STRING log_record_buffer; static LEX_STRING log_record_buffer;
...@@ -119,7 +119,7 @@ static void enlarge_buffer(const TRANSLOG_HEADER_BUFFER *rec) ...@@ -119,7 +119,7 @@ static void enlarge_buffer(const TRANSLOG_HEADER_BUFFER *rec)
} }
} }
static my_bool recovery_message_printed; static my_bool recovery_message_printed;
static inline void print_recovery_message() static inline void print_recovery_message(void)
{ {
/* /*
If we're really doing a recovery (reading REDOs or UNDOs), we print a If we're really doing a recovery (reading REDOs or UNDOs), we print a
...@@ -151,7 +151,7 @@ static inline void print_recovery_message() ...@@ -151,7 +151,7 @@ static inline void print_recovery_message()
@retval !=0 Error @retval !=0 Error
*/ */
int maria_recover() int maria_recover(void)
{ {
int res= 1; int res= 1;
FILE *trace_file; FILE *trace_file;
...@@ -2012,7 +2012,7 @@ static int new_page(File fileid, pgcache_page_no_t pageid, LSN rec_lsn, ...@@ -2012,7 +2012,7 @@ static int new_page(File fileid, pgcache_page_no_t pageid, LSN rec_lsn,
} }
static int close_all_tables() static int close_all_tables(void)
{ {
int error= 0; int error= 0;
LIST *list_element, *next_open; LIST *list_element, *next_open;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
/* Performs recovery of the engine at start */ /* Performs recovery of the engine at start */
C_MODE_START C_MODE_START
int maria_recover(); int maria_recover(void);
int maria_apply_log(LSN lsn, my_bool apply, FILE *trace_file, int maria_apply_log(LSN lsn, my_bool apply, FILE *trace_file,
my_bool execute_undo_phase, my_bool skip_DDLs); my_bool execute_undo_phase, my_bool skip_DDLs);
C_MODE_END C_MODE_END
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