summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-11-28 22:35:59 +0100
committerSergei Golubchik <sergii@pisem.net>2013-11-28 22:35:59 +0100
commitab3604989c826aeda3fed147db64756a66361fb3 (patch)
tree7b0e06b600e210e9597267747a9552e2d7304189 /include
parent38c91c067ba36e1bdc11ded707db9b9f0c84b871 (diff)
downloadmariadb-git-ab3604989c826aeda3fed147db64756a66361fb3.tar.gz
MDEV-4243 [PATCH] Warnings/errors while compiling with clang
fix the code to compile with clang. fix warnings too. include/probes_mysql_nodtrace.h: clang++ doesn't like numeric _constants_ being used in || (it suspects that the intention was | ). Boolean constants are ok. sql/hostname.cc: only used in DBUG_ASSERT sql/item.cc: str_to_time and str_to_datetime return bool, not MYSQL_TIMESTAMP_xxx sql/item_func.cc: str_to_datetime_with_warn() returns bool, not MYSQL_TIMESTAMP_xxx storage/cassandra/CMakeLists.txt: CMAKE_CXX_FLAGS can be empty storage/connect/odbconn.cpp: HWND is void* storage/connect/user_connect.h: deprecated on FreeBSD and unused anyway storage/connect/value.cpp: bad characters inside. unused. storage/spider/spd_trx.cc: clang++ warns that memset will also overwrite vtbl. it might be as well a good idea, as it asserts that the object will only be used as a storage. silence the warning.
Diffstat (limited to 'include')
-rw-r--r--include/probes_mysql_nodtrace.h115
1 files changed, 59 insertions, 56 deletions
diff --git a/include/probes_mysql_nodtrace.h b/include/probes_mysql_nodtrace.h
index bc3b65a00e5..2155e8489da 100644
--- a/include/probes_mysql_nodtrace.h
+++ b/include/probes_mysql_nodtrace.h
@@ -7,120 +7,123 @@
#ifdef __cplusplus
extern "C" {
+#define MYSQL_DTRACE_DISABLED false
+#else
+#define MYSQL_DTRACE_DISABLED 0
#endif
#define MYSQL_CONNECTION_START(arg0, arg1, arg2)
-#define MYSQL_CONNECTION_START_ENABLED() (0)
+#define MYSQL_CONNECTION_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_CONNECTION_DONE(arg0, arg1)
-#define MYSQL_CONNECTION_DONE_ENABLED() (0)
+#define MYSQL_CONNECTION_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3)
-#define MYSQL_COMMAND_START_ENABLED() (0)
+#define MYSQL_COMMAND_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_COMMAND_DONE(arg0)
-#define MYSQL_COMMAND_DONE_ENABLED() (0)
+#define MYSQL_COMMAND_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4)
-#define MYSQL_QUERY_START_ENABLED() (0)
+#define MYSQL_QUERY_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_QUERY_DONE(arg0)
-#define MYSQL_QUERY_DONE_ENABLED() (0)
+#define MYSQL_QUERY_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_QUERY_PARSE_START(arg0)
-#define MYSQL_QUERY_PARSE_START_ENABLED() (0)
+#define MYSQL_QUERY_PARSE_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_QUERY_PARSE_DONE(arg0)
-#define MYSQL_QUERY_PARSE_DONE_ENABLED() (0)
+#define MYSQL_QUERY_PARSE_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_QUERY_CACHE_HIT(arg0, arg1)
-#define MYSQL_QUERY_CACHE_HIT_ENABLED() (0)
+#define MYSQL_QUERY_CACHE_HIT_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_QUERY_CACHE_MISS(arg0)
-#define MYSQL_QUERY_CACHE_MISS_ENABLED() (0)
+#define MYSQL_QUERY_CACHE_MISS_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5)
-#define MYSQL_QUERY_EXEC_START_ENABLED() (0)
+#define MYSQL_QUERY_EXEC_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_QUERY_EXEC_DONE(arg0)
-#define MYSQL_QUERY_EXEC_DONE_ENABLED() (0)
+#define MYSQL_QUERY_EXEC_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_INSERT_ROW_START(arg0, arg1)
-#define MYSQL_INSERT_ROW_START_ENABLED() (0)
+#define MYSQL_INSERT_ROW_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_INSERT_ROW_DONE(arg0)
-#define MYSQL_INSERT_ROW_DONE_ENABLED() (0)
+#define MYSQL_INSERT_ROW_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_UPDATE_ROW_START(arg0, arg1)
-#define MYSQL_UPDATE_ROW_START_ENABLED() (0)
+#define MYSQL_UPDATE_ROW_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_UPDATE_ROW_DONE(arg0)
-#define MYSQL_UPDATE_ROW_DONE_ENABLED() (0)
+#define MYSQL_UPDATE_ROW_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_DELETE_ROW_START(arg0, arg1)
-#define MYSQL_DELETE_ROW_START_ENABLED() (0)
+#define MYSQL_DELETE_ROW_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_DELETE_ROW_DONE(arg0)
-#define MYSQL_DELETE_ROW_DONE_ENABLED() (0)
+#define MYSQL_DELETE_ROW_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_READ_ROW_START(arg0, arg1, arg2)
-#define MYSQL_READ_ROW_START_ENABLED() (0)
+#define MYSQL_READ_ROW_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_READ_ROW_DONE(arg0)
-#define MYSQL_READ_ROW_DONE_ENABLED() (0)
+#define MYSQL_READ_ROW_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_INDEX_READ_ROW_START(arg0, arg1)
-#define MYSQL_INDEX_READ_ROW_START_ENABLED() (0)
+#define MYSQL_INDEX_READ_ROW_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_INDEX_READ_ROW_DONE(arg0)
-#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (0)
+#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1)
-#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (0)
+#define MYSQL_HANDLER_RDLOCK_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1)
-#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (0)
+#define MYSQL_HANDLER_WRLOCK_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1)
-#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (0)
+#define MYSQL_HANDLER_UNLOCK_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_HANDLER_RDLOCK_DONE(arg0)
-#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (0)
+#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_HANDLER_WRLOCK_DONE(arg0)
-#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (0)
+#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_HANDLER_UNLOCK_DONE(arg0)
-#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (0)
+#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_FILESORT_START(arg0, arg1)
-#define MYSQL_FILESORT_START_ENABLED() (0)
+#define MYSQL_FILESORT_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_FILESORT_DONE(arg0, arg1)
-#define MYSQL_FILESORT_DONE_ENABLED() (0)
+#define MYSQL_FILESORT_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_SELECT_START(arg0)
-#define MYSQL_SELECT_START_ENABLED() (0)
+#define MYSQL_SELECT_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_SELECT_DONE(arg0, arg1)
-#define MYSQL_SELECT_DONE_ENABLED() (0)
+#define MYSQL_SELECT_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_INSERT_START(arg0)
-#define MYSQL_INSERT_START_ENABLED() (0)
+#define MYSQL_INSERT_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_INSERT_DONE(arg0, arg1)
-#define MYSQL_INSERT_DONE_ENABLED() (0)
+#define MYSQL_INSERT_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_INSERT_SELECT_START(arg0)
-#define MYSQL_INSERT_SELECT_START_ENABLED() (0)
+#define MYSQL_INSERT_SELECT_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_INSERT_SELECT_DONE(arg0, arg1)
-#define MYSQL_INSERT_SELECT_DONE_ENABLED() (0)
+#define MYSQL_INSERT_SELECT_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_UPDATE_START(arg0)
-#define MYSQL_UPDATE_START_ENABLED() (0)
+#define MYSQL_UPDATE_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_UPDATE_DONE(arg0, arg1, arg2)
-#define MYSQL_UPDATE_DONE_ENABLED() (0)
+#define MYSQL_UPDATE_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_MULTI_UPDATE_START(arg0)
-#define MYSQL_MULTI_UPDATE_START_ENABLED() (0)
+#define MYSQL_MULTI_UPDATE_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2)
-#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (0)
+#define MYSQL_MULTI_UPDATE_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_DELETE_START(arg0)
-#define MYSQL_DELETE_START_ENABLED() (0)
+#define MYSQL_DELETE_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_DELETE_DONE(arg0, arg1)
-#define MYSQL_DELETE_DONE_ENABLED() (0)
+#define MYSQL_DELETE_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_MULTI_DELETE_START(arg0)
-#define MYSQL_MULTI_DELETE_START_ENABLED() (0)
+#define MYSQL_MULTI_DELETE_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_MULTI_DELETE_DONE(arg0, arg1)
-#define MYSQL_MULTI_DELETE_DONE_ENABLED() (0)
+#define MYSQL_MULTI_DELETE_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_NET_READ_START()
-#define MYSQL_NET_READ_START_ENABLED() (0)
+#define MYSQL_NET_READ_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_NET_READ_DONE(arg0, arg1)
-#define MYSQL_NET_READ_DONE_ENABLED() (0)
+#define MYSQL_NET_READ_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_NET_WRITE_START(arg0)
-#define MYSQL_NET_WRITE_START_ENABLED() (0)
+#define MYSQL_NET_WRITE_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_NET_WRITE_DONE(arg0)
-#define MYSQL_NET_WRITE_DONE_ENABLED() (0)
+#define MYSQL_NET_WRITE_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3)
-#define MYSQL_KEYCACHE_READ_START_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_KEYCACHE_READ_BLOCK(arg0)
-#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_KEYCACHE_READ_HIT()
-#define MYSQL_KEYCACHE_READ_HIT_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_HIT_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_KEYCACHE_READ_MISS()
-#define MYSQL_KEYCACHE_READ_MISS_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_MISS_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_KEYCACHE_READ_DONE(arg0, arg1)
-#define MYSQL_KEYCACHE_READ_DONE_ENABLED() (0)
+#define MYSQL_KEYCACHE_READ_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3)
-#define MYSQL_KEYCACHE_WRITE_START_ENABLED() (0)
+#define MYSQL_KEYCACHE_WRITE_START_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_KEYCACHE_WRITE_BLOCK(arg0)
-#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (0)
+#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() MYSQL_DTRACE_DISABLED
#define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1)
-#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (0)
+#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() MYSQL_DTRACE_DISABLED
#ifdef __cplusplus
}