From def9c0b2367808d6e8f6b9ffe2f82f6465d9642b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Feb 2007 22:23:35 +0200 Subject: Fixed compiler warnings. client/mysql_upgrade.c: Fixed problem with mysql_upgrade being dependent on local my.cnf files and problem with memory not being freed. client/mysqltest.c: Changed type to avoid warning. cmd-line-utils/readline/xmalloc.c: Fix to avoid warning. include/my_dbug.h: To disable parts from code in non-debug more. sql/field.cc: Fixed warning. sql/ha_archive.cc: Fixed warning. sql/ha_berkeley.cc: Added casts to avoid warnings. sql/ha_ndbcluster.cc: Fixed warnings. sql/log.cc: Added casts to avoid warnings. sql/slave.cc: Avoid warning. sql/sql_repl.cc: Avoid warning. support-files/compiler_warnings.supp: Added disabled warnings to compiler_warnings.supp file. These are backported mainly from 5.1 suppress file, but there are some additional new ones. --- cmd-line-utils/readline/xmalloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cmd-line-utils/readline') diff --git a/cmd-line-utils/readline/xmalloc.c b/cmd-line-utils/readline/xmalloc.c index 848a3563fa9..497936d3b43 100644 --- a/cmd-line-utils/readline/xmalloc.c +++ b/cmd-line-utils/readline/xmalloc.c @@ -39,8 +39,7 @@ /* **************************************************************** */ static void -memory_error_and_abort (fname) - char *fname; +memory_error_and_abort(const char *fname) { fprintf (stderr, "%s: out of virtual memory\n", fname); exit (2); @@ -57,7 +56,7 @@ xmalloc (bytes) temp = malloc (bytes); if (temp == 0) - memory_error_and_abort ((char*) "xmalloc"); + memory_error_and_abort("xmalloc"); return (temp); } @@ -71,7 +70,7 @@ xrealloc (pointer, bytes) temp = pointer ? realloc (pointer, bytes) : malloc (bytes); if (temp == 0) - memory_error_and_abort ((char*) "xrealloc"); + memory_error_and_abort("xrealloc"); return (temp); } -- cgit v1.2.1