From ec6019f9b90f7f3adc7a49ac4f3a8ffb279d9362 Mon Sep 17 00:00:00 2001 From: Mats Kindahl Date: Mon, 25 Aug 2008 14:23:49 +0200 Subject: [PATCH] Eliminating some compiler warnings. --- sql/sql_class.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/sql_class.h b/sql/sql_class.h index 0bc8d00b22c..488a35ff070 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1001,6 +1001,7 @@ show_system_thread(enum_thread_type thread) { #define RETURN_NAME_AS_STRING(NAME) case (NAME): return #NAME switch (thread) { + static char buf[64]; RETURN_NAME_AS_STRING(NON_SYSTEM_THREAD); RETURN_NAME_AS_STRING(SYSTEM_THREAD_DELAYED_INSERT); RETURN_NAME_AS_STRING(SYSTEM_THREAD_SLAVE_IO); @@ -1008,6 +1009,9 @@ show_system_thread(enum_thread_type thread) RETURN_NAME_AS_STRING(SYSTEM_THREAD_NDBCLUSTER_BINLOG); RETURN_NAME_AS_STRING(SYSTEM_THREAD_EVENT_SCHEDULER); RETURN_NAME_AS_STRING(SYSTEM_THREAD_EVENT_WORKER); + default: + sprintf(buf, "", thread); + return buf; } #undef RETURN_NAME_AS_STRING }