diff options
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_error.c | 18 | ||||
-rw-r--r-- | mysys/my_messnc.c | 6 | ||||
-rw-r--r-- | mysys/my_static.c | 6 |
3 files changed, 14 insertions, 16 deletions
diff --git a/mysys/my_error.c b/mysys/my_error.c index 2cf704d0089..e407e7706fc 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -22,7 +22,6 @@ /* Max length of a error message. Should be kept in sync with MYSQL_ERRMSG_SIZE. */ #define ERRMSGSIZE (512) - /* Define some external variables for error handling */ /* @@ -67,12 +66,9 @@ static struct my_err_head *my_errmsgs_list= &my_errmsgs_globerrs; MyFlags Flags ... variable list - RETURN - What (*error_handler_hook)() returns: - 0 OK */ -int my_error(int nr, myf MyFlags, ...) +void my_error(int nr, myf MyFlags, ...) { const char *format; struct my_err_head *meh_p; @@ -96,7 +92,8 @@ int my_error(int nr, myf MyFlags, ...) (void) my_vsnprintf (ebuff, sizeof(ebuff), format, args); va_end(args); } - DBUG_RETURN((*error_handler_hook)(nr, ebuff, MyFlags)); + (*error_handler_hook)(nr, ebuff, MyFlags); + DBUG_VOID_RETURN; } @@ -111,7 +108,7 @@ int my_error(int nr, myf MyFlags, ...) ... variable list */ -int my_printf_error(uint error, const char *format, myf MyFlags, ...) +void my_printf_error(uint error, const char *format, myf MyFlags, ...) { va_list args; char ebuff[ERRMSGSIZE]; @@ -122,7 +119,8 @@ int my_printf_error(uint error, const char *format, myf MyFlags, ...) va_start(args,MyFlags); (void) my_vsnprintf (ebuff, sizeof(ebuff), format, args); va_end(args); - DBUG_RETURN((*error_handler_hook)(error, ebuff, MyFlags)); + (*error_handler_hook)(error, ebuff, MyFlags); + DBUG_VOID_RETURN; } /* @@ -135,9 +133,9 @@ int my_printf_error(uint error, const char *format, myf MyFlags, ...) MyFlags Flags */ -int my_message(uint error, const char *str, register myf MyFlags) +void my_message(uint error, const char *str, register myf MyFlags) { - return (*error_handler_hook)(error, str, MyFlags); + (*error_handler_hook)(error, str, MyFlags); } diff --git a/mysys/my_messnc.c b/mysys/my_messnc.c index e2431959b7a..e2dee3f6710 100644 --- a/mysys/my_messnc.c +++ b/mysys/my_messnc.c @@ -15,8 +15,8 @@ #include "mysys_priv.h" -int my_message_no_curses(uint error __attribute__((unused)), - const char *str, myf MyFlags) +void my_message_no_curses(uint error __attribute__((unused)), + const char *str, myf MyFlags) { DBUG_ENTER("my_message_no_curses"); DBUG_PRINT("enter",("message: %s",str)); @@ -34,5 +34,5 @@ int my_message_no_curses(uint error __attribute__((unused)), (void)fputs(str,stderr); (void)fputc('\n',stderr); (void)fflush(stderr); - DBUG_RETURN(0); + DBUG_VOID_RETURN; } diff --git a/mysys/my_static.c b/mysys/my_static.c index d0c20da828a..1e7c30992f8 100644 --- a/mysys/my_static.c +++ b/mysys/my_static.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -87,9 +87,9 @@ ulong my_time_to_wait_for_lock=2; /* In seconds */ char * NEAR globerrs[GLOBERRS]; /* my_error_messages is here */ #endif void (*my_abort_hook)(int) = (void(*)(int)) exit; -int (*error_handler_hook)(uint error,const char *str,myf MyFlags)= +void (*error_handler_hook)(uint error,const char *str,myf MyFlags)= my_message_no_curses; -int (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)= +void (*fatal_error_handler_hook)(uint error,const char *str,myf MyFlags)= my_message_no_curses; #ifdef __WIN__ |