summaryrefslogtreecommitdiff
path: root/include/my_global.h
diff options
context:
space:
mode:
authorMats Kindahl <mats@mysql.com>2008-08-22 12:40:21 +0200
committerMats Kindahl <mats@mysql.com>2008-08-22 12:40:21 +0200
commit8b637b284784d92b912318cd3b52d1550920fa09 (patch)
tree08c21d059849cad6cc8d0abd2edf15881718a197 /include/my_global.h
parent7207b18b25c5b0627a9a5c5b4261bd9a55cdd722 (diff)
downloadmariadb-git-8b637b284784d92b912318cd3b52d1550920fa09.tar.gz
Fixning compiler warnings. Fixing build failure for valgrind platform.
include/my_global.h: Moving YESNO() macro here from log.cc (it prints either "yes" or "no" depending on a boolean value). sql/log.cc: Moving YESNO() function to my_global.h. sql/sql_class.cc: Adding default case to printout function to avoid warning. Only defining function for debug builds since it isn't used in non-debug build (hence produce a warning). sql/sql_class.h: Printing yes/no answer instead of memory address since the case produces an error/warning on valgrind platform.
Diffstat (limited to 'include/my_global.h')
-rw-r--r--include/my_global.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 6cfc4d67305..c6ac90d4a34 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -1130,6 +1130,9 @@ typedef char bool; /* Ordinary boolean values 0 1 */
#define dbug_volatile
#endif
+/* Some helper macros */
+#define YESNO(X) ((X) ? "yes" : "no")
+
/* Defines for time function */
#define SCALE_SEC 100
#define SCALE_USEC 10000