summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2016-03-14 08:20:00 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2016-03-14 08:20:00 +0200
commit5d7f1bfbd1da6d198c12edb8672f4b880a521faa (patch)
tree00e8fa40e7cd28ab471366d71e98a5ee6b1bdba9
parent53fe0d4758445d6c432457ada48282dc73df6b7a (diff)
downloadmariadb-git-bb-10.1-mdev9362.tar.gz
Fix more Windows compiler warnings.bb-10.1-mdev9362
-rw-r--r--storage/innobase/btr/btr0btr.cc6
-rw-r--r--storage/innobase/dict/dict0crea.cc2
-rw-r--r--storage/innobase/dict/dict0dict.cc2
-rw-r--r--storage/innobase/dict/dict0mem.cc4
-rw-r--r--storage/innobase/fil/fil0crypt.cc20
-rw-r--r--storage/innobase/fil/fil0pagecompress.cc4
-rw-r--r--storage/innobase/include/fil0crypt.h2
-rw-r--r--storage/xtradb/btr/btr0btr.cc6
-rw-r--r--storage/xtradb/dict/dict0crea.cc2
-rw-r--r--storage/xtradb/dict/dict0dict.cc2
-rw-r--r--storage/xtradb/dict/dict0mem.cc4
-rw-r--r--storage/xtradb/fil/fil0crypt.cc20
-rw-r--r--storage/xtradb/fil/fil0pagecompress.cc4
-rw-r--r--storage/xtradb/include/fil0crypt.h2
14 files changed, 40 insertions, 40 deletions
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index 3df80602274..dd3884b882d 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -1373,7 +1373,7 @@ btr_page_free_low(
* pages should be possible
*/
uint cnt = 0;
- uint bytes = 0;
+ size_t bytes = 0;
page_t* page = buf_block_get_frame(block);
mem_heap_t* heap = NULL;
ulint* offsets = NULL;
@@ -1391,10 +1391,10 @@ btr_page_free_low(
#ifdef UNIV_DEBUG_SCRUBBING
fprintf(stderr,
"btr_page_free_low: scrub %lu/%lu - "
- "%u records %u bytes\n",
+ "%u records %lu bytes\n",
buf_block_get_space(block),
buf_block_get_page_no(block),
- cnt, bytes);
+ cnt, (ulint)bytes);
#endif /* UNIV_DEBUG_SCRUBBING */
if (heap) {
mem_heap_free(heap);
diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc
index cbee19e82f9..3d2dd6e6c2a 100644
--- a/storage/innobase/dict/dict0crea.cc
+++ b/storage/innobase/dict/dict0crea.cc
@@ -1737,7 +1737,7 @@ dict_create_add_foreign_to_dictionary(
innobase_convert_name(buf, MAX_TABLE_NAME_LEN,
foreign->id, strlen(foreign->id), trx->mysql_thd, FALSE);
fk_def = dict_foreign_def_get((dict_foreign_t*)foreign, trx);
- dict_foreign_def_get_fields((dict_foreign_t*)foreign, trx, &field, &field2, i);
+ dict_foreign_def_get_fields((dict_foreign_t*)foreign, trx, &field, &field2, (int)i);
ib_push_warning(trx, error,
"Create or Alter table %s with foreign key constraint"
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 13f1ee6fc3c..d3b1d567c7a 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -6857,7 +6857,7 @@ dict_fs2utf8(
db[db_len] = '\0';
strconvert(
- &my_charset_filename, db, db_len, system_charset_info,
+ &my_charset_filename, db, (uint)db_len, system_charset_info,
db_utf8, static_cast<uint>(db_utf8_size), &errors);
/* convert each # to @0023 in table name and store the result in buf */
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc
index 39d0d558c18..9f8b812ada7 100644
--- a/storage/innobase/dict/dict0mem.cc
+++ b/storage/innobase/dict/dict0mem.cc
@@ -163,12 +163,12 @@ dict_mem_table_is_system(
/* table has the following format: database/table
and some system table are of the form SYS_* */
if (strchr(name, '/')) {
- int table_len = strlen(name);
+ size_t table_len = strlen(name);
const char *system_db;
int i = 0;
while ((system_db = innobase_system_databases[i++])
&& (system_db != NullS)) {
- int len = strlen(system_db);
+ size_t len = strlen(system_db);
if (table_len > len && !strncmp(name, system_db, len)) {
return true;
}
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index f8fda53e49b..89376c2ec73 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -322,7 +322,7 @@ fil_space_read_crypt_data(
fil_encryption_t encryption = (fil_encryption_t)mach_read_from_1(
page + offset + MAGIC_SZ + 2 + iv_length + 8);
- const uint sz = (uint)sizeof(fil_space_crypt_t) + iv_length;
+ size_t sz = sizeof(fil_space_crypt_t) + iv_length;
crypt_data = static_cast<fil_space_crypt_t*>(malloc(sz));
memset(crypt_data, 0, sz);
@@ -589,9 +589,9 @@ fil_encrypt_buf(
srclen = mach_read_from_2(src_frame + FIL_PAGE_DATA);
}
- int rc = encryption_scheme_encrypt(src, srclen, dst, &dstlen,
- crypt_data, key_version,
- space, offset, lsn);
+ int rc = encryption_scheme_encrypt(src, (uint)srclen, dst, (uint *)&dstlen,
+ crypt_data, key_version,
+ (uint)space, (uint)offset, (unsigned long long)lsn);
if (! ((rc == MY_AES_OK) && ((ulint) dstlen == srclen))) {
ib_logf(IB_LOG_LEVEL_FATAL,
@@ -710,7 +710,7 @@ fil_space_decrypt(
error code */
{
ulint page_type = mach_read_from_2(src_frame+FIL_PAGE_TYPE);
- uint key_version = mach_read_from_4(src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
+ uint key_version = (uint)mach_read_from_4(src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
bool page_compressed = (page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
*err = DB_SUCCESS;
@@ -746,9 +746,9 @@ fil_space_decrypt(
srclen = mach_read_from_2(src_frame + FIL_PAGE_DATA);
}
- int rc = encryption_scheme_decrypt(src, srclen, dst, &dstlen,
- crypt_data, key_version,
- space, offset, lsn);
+ int rc = encryption_scheme_decrypt(src, (uint)srclen, dst, (uint *)&dstlen,
+ crypt_data, key_version,
+ (uint)space, (uint)offset, (unsigned long long)lsn);
if (! ((rc == MY_AES_OK) && ((ulint) dstlen == srclen))) {
@@ -821,7 +821,7 @@ Calculate post encryption checksum
@return page checksum or BUF_NO_CHECKSUM_MAGIC
not needed. */
UNIV_INTERN
-ulint
+ib_uint32_t
fil_crypt_calculate_checksum(
/*=========================*/
ulint zip_size, /*!< in: zip_size or 0 */
@@ -850,7 +850,7 @@ fil_crypt_calculate_checksum(
* if new enum is added and not handled here */
}
} else {
- checksum = page_zip_calc_checksum(dst_frame, zip_size,
+ checksum = (ib_uint32_t)page_zip_calc_checksum(dst_frame, zip_size,
algorithm);
}
diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc
index 1af44de25d5..cb29cdadbd1 100644
--- a/storage/innobase/fil/fil0pagecompress.cc
+++ b/storage/innobase/fil/fil0pagecompress.cc
@@ -107,7 +107,7 @@ fil_compress_page(
byte* lzo_mem) /*!< in: temporal memory used by LZO */
{
int err = Z_OK;
- int comp_level = level;
+ int comp_level = (int)level;
ulint header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE;
ulint write_size=0;
/* Cache to avoid change during function execution */
@@ -302,7 +302,7 @@ fil_compress_page(
#endif /* HAVE_SNAPPY */
case PAGE_ZLIB_ALGORITHM:
- err = compress2(out_buf+header_len, (ulong*)&write_size, buf, len, comp_level);
+ err = compress2(out_buf+header_len, (ulong*)&write_size, buf, (ulong)len, (int)comp_level);
if (err != Z_OK) {
/* If error we leave the actual page as it was */
diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h
index cf2e022c006..0b2d9e252da 100644
--- a/storage/innobase/include/fil0crypt.h
+++ b/storage/innobase/include/fil0crypt.h
@@ -415,7 +415,7 @@ Calculate post encryption checksum
@return page checksum or BUF_NO_CHECKSUM_MAGIC
not needed. */
UNIV_INTERN
-ulint
+ib_uint32_t
fil_crypt_calculate_checksum(
/*=========================*/
ulint zip_size, /*!< in: zip_size or 0 */
diff --git a/storage/xtradb/btr/btr0btr.cc b/storage/xtradb/btr/btr0btr.cc
index d2fba4985df..46eb5947585 100644
--- a/storage/xtradb/btr/btr0btr.cc
+++ b/storage/xtradb/btr/btr0btr.cc
@@ -1393,7 +1393,7 @@ btr_page_free_low(
* pages should be possible
*/
uint cnt = 0;
- uint bytes = 0;
+ size_t bytes = 0;
page_t* page = buf_block_get_frame(block);
mem_heap_t* heap = NULL;
ulint* offsets = NULL;
@@ -1411,10 +1411,10 @@ btr_page_free_low(
#ifdef UNIV_DEBUG_SCRUBBING
fprintf(stderr,
"btr_page_free_low: scrub %lu/%lu - "
- "%u records %u bytes\n",
+ "%u records %lu bytes\n",
buf_block_get_space(block),
buf_block_get_page_no(block),
- cnt, bytes);
+ cnt, (ulint)bytes);
#endif /* UNIV_DEBUG_SCRUBBING */
if (heap) {
mem_heap_free(heap);
diff --git a/storage/xtradb/dict/dict0crea.cc b/storage/xtradb/dict/dict0crea.cc
index 993a56a5cd6..e0d3b259fac 100644
--- a/storage/xtradb/dict/dict0crea.cc
+++ b/storage/xtradb/dict/dict0crea.cc
@@ -1737,7 +1737,7 @@ dict_create_add_foreign_to_dictionary(
innobase_convert_name(buf, MAX_TABLE_NAME_LEN,
foreign->id, strlen(foreign->id), trx->mysql_thd, FALSE);
fk_def = dict_foreign_def_get((dict_foreign_t*)foreign, trx);
- dict_foreign_def_get_fields((dict_foreign_t*)foreign, trx, &field, &field2, i);
+ dict_foreign_def_get_fields((dict_foreign_t*)foreign, trx, &field, &field2, (int)i);
ib_push_warning(trx, error,
"Create or Alter table %s with foreign key constraint"
diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc
index 7c25b1e4ef1..02e4e97aed6 100644
--- a/storage/xtradb/dict/dict0dict.cc
+++ b/storage/xtradb/dict/dict0dict.cc
@@ -6879,7 +6879,7 @@ dict_fs2utf8(
db[db_len] = '\0';
strconvert(
- &my_charset_filename, db, db_len, system_charset_info,
+ &my_charset_filename, db, (uint)db_len, system_charset_info,
db_utf8, static_cast<uint>(db_utf8_size), &errors);
/* convert each # to @0023 in table name and store the result in buf */
diff --git a/storage/xtradb/dict/dict0mem.cc b/storage/xtradb/dict/dict0mem.cc
index 51fc389e6af..f025e90c16e 100644
--- a/storage/xtradb/dict/dict0mem.cc
+++ b/storage/xtradb/dict/dict0mem.cc
@@ -166,12 +166,12 @@ dict_mem_table_is_system(
/* table has the following format: database/table
and some system table are of the form SYS_* */
if (strchr(name, '/')) {
- int table_len = strlen(name);
+ size_t table_len = strlen(name);
const char *system_db;
int i = 0;
while ((system_db = innobase_system_databases[i++])
&& (system_db != NullS)) {
- int len = strlen(system_db);
+ size_t len = strlen(system_db);
if (table_len > len && !strncmp(name, system_db, len)) {
return true;
}
diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc
index f8fda53e49b..89376c2ec73 100644
--- a/storage/xtradb/fil/fil0crypt.cc
+++ b/storage/xtradb/fil/fil0crypt.cc
@@ -322,7 +322,7 @@ fil_space_read_crypt_data(
fil_encryption_t encryption = (fil_encryption_t)mach_read_from_1(
page + offset + MAGIC_SZ + 2 + iv_length + 8);
- const uint sz = (uint)sizeof(fil_space_crypt_t) + iv_length;
+ size_t sz = sizeof(fil_space_crypt_t) + iv_length;
crypt_data = static_cast<fil_space_crypt_t*>(malloc(sz));
memset(crypt_data, 0, sz);
@@ -589,9 +589,9 @@ fil_encrypt_buf(
srclen = mach_read_from_2(src_frame + FIL_PAGE_DATA);
}
- int rc = encryption_scheme_encrypt(src, srclen, dst, &dstlen,
- crypt_data, key_version,
- space, offset, lsn);
+ int rc = encryption_scheme_encrypt(src, (uint)srclen, dst, (uint *)&dstlen,
+ crypt_data, key_version,
+ (uint)space, (uint)offset, (unsigned long long)lsn);
if (! ((rc == MY_AES_OK) && ((ulint) dstlen == srclen))) {
ib_logf(IB_LOG_LEVEL_FATAL,
@@ -710,7 +710,7 @@ fil_space_decrypt(
error code */
{
ulint page_type = mach_read_from_2(src_frame+FIL_PAGE_TYPE);
- uint key_version = mach_read_from_4(src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
+ uint key_version = (uint)mach_read_from_4(src_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
bool page_compressed = (page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
*err = DB_SUCCESS;
@@ -746,9 +746,9 @@ fil_space_decrypt(
srclen = mach_read_from_2(src_frame + FIL_PAGE_DATA);
}
- int rc = encryption_scheme_decrypt(src, srclen, dst, &dstlen,
- crypt_data, key_version,
- space, offset, lsn);
+ int rc = encryption_scheme_decrypt(src, (uint)srclen, dst, (uint *)&dstlen,
+ crypt_data, key_version,
+ (uint)space, (uint)offset, (unsigned long long)lsn);
if (! ((rc == MY_AES_OK) && ((ulint) dstlen == srclen))) {
@@ -821,7 +821,7 @@ Calculate post encryption checksum
@return page checksum or BUF_NO_CHECKSUM_MAGIC
not needed. */
UNIV_INTERN
-ulint
+ib_uint32_t
fil_crypt_calculate_checksum(
/*=========================*/
ulint zip_size, /*!< in: zip_size or 0 */
@@ -850,7 +850,7 @@ fil_crypt_calculate_checksum(
* if new enum is added and not handled here */
}
} else {
- checksum = page_zip_calc_checksum(dst_frame, zip_size,
+ checksum = (ib_uint32_t)page_zip_calc_checksum(dst_frame, zip_size,
algorithm);
}
diff --git a/storage/xtradb/fil/fil0pagecompress.cc b/storage/xtradb/fil/fil0pagecompress.cc
index 0ed8bcdfb2f..4b5a178aa53 100644
--- a/storage/xtradb/fil/fil0pagecompress.cc
+++ b/storage/xtradb/fil/fil0pagecompress.cc
@@ -107,7 +107,7 @@ fil_compress_page(
byte* lzo_mem) /*!< in: temporal memory used by LZO */
{
int err = Z_OK;
- int comp_level = level;
+ int comp_level = (int)level;
ulint header_len = FIL_PAGE_DATA + FIL_PAGE_COMPRESSED_SIZE;
ulint write_size=0;
/* Cache to avoid change during function execution */
@@ -302,7 +302,7 @@ fil_compress_page(
#endif /* HAVE_SNAPPY */
case PAGE_ZLIB_ALGORITHM:
- err = compress2(out_buf+header_len, (ulong*)&write_size, buf, len, comp_level);
+ err = compress2(out_buf+header_len, (ulong*)&write_size, buf, (ulong)len, (int)comp_level);
if (err != Z_OK) {
/* If error we leave the actual page as it was */
diff --git a/storage/xtradb/include/fil0crypt.h b/storage/xtradb/include/fil0crypt.h
index c42a0cf7e3f..2fbf09757fa 100644
--- a/storage/xtradb/include/fil0crypt.h
+++ b/storage/xtradb/include/fil0crypt.h
@@ -415,7 +415,7 @@ Calculate post encryption checksum
@return page checksum or BUF_NO_CHECKSUM_MAGIC
not needed. */
UNIV_INTERN
-ulint
+ib_uint32_t
fil_crypt_calculate_checksum(
/*=========================*/
ulint zip_size, /*!< in: zip_size or 0 */