summaryrefslogtreecommitdiff
path: root/storage/innobase/fil
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-03-10 20:05:17 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-03-11 08:29:48 +0200
commit574d8b29402f9826f73eeb54a3b9cc406268710c (patch)
tree561112cee04b8fe28b1bdb153bc2e24dddf8b545 /storage/innobase/fil
parent6ec3682371116f58c88e3affa4f9e129aaa44fcf (diff)
downloadmariadb-git-574d8b29402f9826f73eeb54a3b9cc406268710c.tar.gz
MDEV-21907: Fix most clang -Wconversion in InnoDB
Declare innodb_purge_threads as 4-byte integer (UINT) instead of 4-or-8-byte (ULONG) and adjust the documentation string.
Diffstat (limited to 'storage/innobase/fil')
-rw-r--r--storage/innobase/fil/fil0crypt.cc7
-rw-r--r--storage/innobase/fil/fil0pagecompress.cc15
2 files changed, 11 insertions, 11 deletions
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index 7c09a1ff5bb..99398dc9f0b 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -2247,10 +2247,7 @@ fil_crypt_set_rotation_iops(
/*********************************************************************
Adjust encrypt tables
@param[in] val New setting for innodb-encrypt-tables */
-UNIV_INTERN
-void
-fil_crypt_set_encrypt_tables(
- uint val)
+void fil_crypt_set_encrypt_tables(ulong val)
{
mutex_enter(&fil_system.mutex);
@@ -2494,6 +2491,6 @@ bool fil_space_verify_crypt_checksum(const byte* page, ulint zip_size)
|| checksum == buf_calc_page_new_checksum(page);
}
- ut_ad(!"unhandled innodb_checksum_algorithm");
+ ut_ad("unhandled innodb_checksum_algorithm" == 0);
return false;
}
diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc
index e6f23c852dc..bea8877215a 100644
--- a/storage/innobase/fil/fil0pagecompress.cc
+++ b/storage/innobase/fil/fil0pagecompress.cc
@@ -86,13 +86,13 @@ static ulint fil_page_compress_low(
byte* out_buf,
ulint header_len,
ulint comp_algo,
- ulint comp_level)
+ unsigned comp_level)
{
ulint write_size = srv_page_size - header_len;
switch (comp_algo) {
default:
- ut_ad(!"unknown compression method");
+ ut_ad("unknown compression method" == 0);
/* fall through */
case PAGE_UNCOMPRESSED:
return 0;
@@ -211,7 +211,8 @@ static ulint fil_page_compress_for_full_crc32(
ulint write_size = fil_page_compress_low(
buf, out_buf, header_len,
- fil_space_t::get_compression_algo(flags), comp_level);
+ fil_space_t::get_compression_algo(flags),
+ static_cast<unsigned>(comp_level));
if (write_size == 0) {
fail:
@@ -459,7 +460,9 @@ static bool fil_page_decompress_low(
return LZ4_decompress_safe(
reinterpret_cast<const char*>(buf) + header_len,
reinterpret_cast<char*>(tmp_buf),
- actual_size, srv_page_size) == int(srv_page_size);
+ static_cast<int>(actual_size),
+ static_cast<int>(srv_page_size)) ==
+ static_cast<int>(srv_page_size);
#endif /* HAVE_LZ4 */
#ifdef HAVE_LZO
case PAGE_LZO_ALGORITHM:
@@ -488,12 +491,12 @@ static bool fil_page_decompress_low(
#ifdef HAVE_BZIP2
case PAGE_BZIP2_ALGORITHM:
{
- unsigned int dst_pos = srv_page_size;
+ uint dst_pos = static_cast<uint>(srv_page_size);
return BZ_OK == BZ2_bzBuffToBuffDecompress(
reinterpret_cast<char*>(tmp_buf),
&dst_pos,
reinterpret_cast<char*>(buf) + header_len,
- actual_size, 1, 0)
+ static_cast<uint>(actual_size), 1, 0)
&& dst_pos == srv_page_size;
}
#endif /* HAVE_BZIP2 */