diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-11-28 22:35:59 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-11-28 22:35:59 +0100 |
commit | ab3604989c826aeda3fed147db64756a66361fb3 (patch) | |
tree | 7b0e06b600e210e9597267747a9552e2d7304189 /storage/cassandra | |
parent | 38c91c067ba36e1bdc11ded707db9b9f0c84b871 (diff) | |
download | mariadb-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 'storage/cassandra')
-rw-r--r-- | storage/cassandra/CMakeLists.txt | 4 | ||||
-rw-r--r-- | storage/cassandra/cassandra_se.cc | 6 | ||||
-rw-r--r-- | storage/cassandra/cassandra_se.h | 18 |
3 files changed, 14 insertions, 14 deletions
diff --git a/storage/cassandra/CMakeLists.txt b/storage/cassandra/CMakeLists.txt index eb3bf7a115a..9fdf61908db 100644 --- a/storage/cassandra/CMakeLists.txt +++ b/storage/cassandra/CMakeLists.txt @@ -21,8 +21,8 @@ ENDIF() INCLUDE_DIRECTORIES(AFTER ${Thrift_INCLUDE_DIRS}/..) SET(CMAKE_REQUIRED_INCLUDES ${Thrift_INCLUDE_DIRS}) -STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) -STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") SET(CMAKE_REQUIRED_INCLUDES "${Thrift_INCLUDE_DIRS}/..") CHECK_CXX_SOURCE_COMPILES( diff --git a/storage/cassandra/cassandra_se.cc b/storage/cassandra/cassandra_se.cc index 111f30f715f..384f04d1c04 100644 --- a/storage/cassandra/cassandra_se.cc +++ b/storage/cassandra/cassandra_se.cc @@ -101,7 +101,7 @@ public: const char* get_default_validator(); /* Settings */ - void set_consistency_levels(ulong read_cons_level, ulong write_cons_level); + void set_consistency_levels(unsigned long read_cons_level, unsigned long write_cons_level); virtual void set_n_retries(uint retries_arg) { thrift_call_retries_to_do= retries_arg; } @@ -228,8 +228,8 @@ bool Cassandra_se_impl::reconnect() } -void Cassandra_se_impl::set_consistency_levels(ulong read_cons_level, - ulong write_cons_level) +void Cassandra_se_impl::set_consistency_levels(unsigned long read_cons_level, + unsigned long write_cons_level) { write_cons_level= (ConsistencyLevel::type)(write_cons_level + 1); read_cons_level= (ConsistencyLevel::type)(read_cons_level + 1); diff --git a/storage/cassandra/cassandra_se.h b/storage/cassandra/cassandra_se.h index 2d3d5f27a56..d1286ae2d0b 100644 --- a/storage/cassandra/cassandra_se.h +++ b/storage/cassandra/cassandra_se.h @@ -44,7 +44,7 @@ public: virtual void set_column_family(const char *cfname) = 0; /* Settings */ - virtual void set_consistency_levels(ulong read_cons_level, ulong write_cons_level)=0; + virtual void set_consistency_levels(unsigned long read_cons_level, unsigned long write_cons_level)=0; virtual void set_n_retries(uint retries_arg)=0; /* Check underlying DDL */ @@ -105,16 +105,16 @@ public: class Cassandra_status_vars { public: - ulong row_inserts; - ulong row_insert_batches; + unsigned long row_inserts; + unsigned long row_insert_batches; - ulong multiget_reads; - ulong multiget_keys_scanned; - ulong multiget_rows_read; + unsigned long multiget_reads; + unsigned long multiget_keys_scanned; + unsigned long multiget_rows_read; - ulong timeout_exceptions; - ulong unavailable_exceptions; - ulong network_exceptions; + unsigned long timeout_exceptions; + unsigned long unavailable_exceptions; + unsigned long network_exceptions; }; |