summaryrefslogtreecommitdiff
path: root/storage/spider
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-03-01 08:27:39 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-03-07 19:07:27 +0200
commit89d80c1b0be94639d0913dee7b6a284c32787b09 (patch)
treea08340d45a09b067df4490259f68b5a3f9d2fa03 /storage/spider
parentd2f5e624223fe502ddf4c6f42062c29edb988627 (diff)
downloadmariadb-git-89d80c1b0be94639d0913dee7b6a284c32787b09.tar.gz
Fix many -Wconversion warnings.
Define my_thread_id as an unsigned type, to avoid mismatch with ulonglong. Change some parameters to this type. Use size_t in a few more places. Declare many flag constants as unsigned to avoid sign mismatch when shifting bits or applying the unary ~ operator. When applying the unary ~ operator to enum constants, explictly cast the result to an unsigned type, because enum constants can be treated as signed. In InnoDB, change the source code line number parameters from ulint to unsigned type. Also, make some InnoDB functions return a narrower type (unsigned or uint32_t instead of ulint; bool instead of ibool).
Diffstat (limited to 'storage/spider')
-rw-r--r--storage/spider/spd_db_include.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h
index 56dbc9ce0dc..929b9778556 100644
--- a/storage/spider/spd_db_include.h
+++ b/storage/spider/spd_db_include.h
@@ -182,32 +182,32 @@ typedef st_spider_result SPIDER_RESULT;
#define SPIDER_SQL_LCL_NAME_QUOTE_STR "`"
#define SPIDER_SQL_LCL_NAME_QUOTE_LEN (sizeof(SPIDER_SQL_LCL_NAME_QUOTE_STR) - 1)
-#define SPIDER_CONN_KIND_MYSQL (1 << 0)
+#define SPIDER_CONN_KIND_MYSQL (1U << 0)
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
-#define SPIDER_CONN_KIND_HS_READ (1 << 2)
-#define SPIDER_CONN_KIND_HS_WRITE (1 << 3)
+#define SPIDER_CONN_KIND_HS_READ (1U << 2)
+#define SPIDER_CONN_KIND_HS_WRITE (1U << 3)
#endif
-#define SPIDER_SQL_KIND_SQL (1 << 0)
-#define SPIDER_SQL_KIND_HANDLER (1 << 1)
+#define SPIDER_SQL_KIND_SQL (1U << 0)
+#define SPIDER_SQL_KIND_HANDLER (1U << 1)
#if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET)
-#define SPIDER_SQL_KIND_HS (1 << 2)
+#define SPIDER_SQL_KIND_HS (1U << 2)
#endif
-#define SPIDER_SQL_TYPE_SELECT_SQL (1 << 0)
-#define SPIDER_SQL_TYPE_INSERT_SQL (1 << 1)
-#define SPIDER_SQL_TYPE_UPDATE_SQL (1 << 2)
-#define SPIDER_SQL_TYPE_DELETE_SQL (1 << 3)
-#define SPIDER_SQL_TYPE_BULK_UPDATE_SQL (1 << 4)
-#define SPIDER_SQL_TYPE_TMP_SQL (1 << 5)
-#define SPIDER_SQL_TYPE_DROP_TMP_TABLE_SQL (1 << 6)
-#define SPIDER_SQL_TYPE_OTHER_SQL (1 << 7)
-#define SPIDER_SQL_TYPE_HANDLER (1 << 8)
-#define SPIDER_SQL_TYPE_SELECT_HS (1 << 9)
-#define SPIDER_SQL_TYPE_INSERT_HS (1 << 10)
-#define SPIDER_SQL_TYPE_UPDATE_HS (1 << 11)
-#define SPIDER_SQL_TYPE_DELETE_HS (1 << 12)
-#define SPIDER_SQL_TYPE_OTHER_HS (1 << 13)
+#define SPIDER_SQL_TYPE_SELECT_SQL (1U << 0)
+#define SPIDER_SQL_TYPE_INSERT_SQL (1U << 1)
+#define SPIDER_SQL_TYPE_UPDATE_SQL (1U << 2)
+#define SPIDER_SQL_TYPE_DELETE_SQL (1U << 3)
+#define SPIDER_SQL_TYPE_BULK_UPDATE_SQL (1U << 4)
+#define SPIDER_SQL_TYPE_TMP_SQL (1U << 5)
+#define SPIDER_SQL_TYPE_DROP_TMP_TABLE_SQL (1U << 6)
+#define SPIDER_SQL_TYPE_OTHER_SQL (1U << 7)
+#define SPIDER_SQL_TYPE_HANDLER (1U << 8)
+#define SPIDER_SQL_TYPE_SELECT_HS (1U << 9)
+#define SPIDER_SQL_TYPE_INSERT_HS (1U << 10)
+#define SPIDER_SQL_TYPE_UPDATE_HS (1U << 11)
+#define SPIDER_SQL_TYPE_DELETE_HS (1U << 12)
+#define SPIDER_SQL_TYPE_OTHER_HS (1U << 13)
enum spider_bulk_upd_start {
SPD_BU_NOT_START,