[Commits] 6ffbfb92ed3: Try to fix windows compiler warnings
revision-id: 6ffbfb92ed33b8b94a0de826d7971cf87a78f64e (mariadb-10.3.12-54-g6ffbfb92ed3) parent(s): 56a8acd2e90c6b9e5f0554e9335590e0427ed2fd author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2019-02-14 12:53:49 +0100 message: Try to fix windows compiler warnings --- sql/log_event.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index 7d099479549..28ac34c8a0f 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -11959,7 +11959,7 @@ bool copy_cache_to_file_wrapped(IO_CACHE *body, contribution of non-compressed packet. */ my_fprintf(file, fmt_frag, 0); - if (my_b_copy_to_file(body, file, cache_size/2 + 1)) + if (my_b_copy_to_file(body, file, (size_t) cache_size/2 + 1)) goto err; my_fprintf(file, fmt_n_delim, delimiter); @@ -12018,7 +12018,8 @@ bool copy_cache_to_string_wrapped(IO_CACHE *cache, if (reinit_io_cache(cache, READ_CACHE, 0L, FALSE, FALSE)) goto err; - if (!(to->str= (char*) my_malloc(cache->end_of_file + fmt_size, MYF(0)))) + if (!(to->str= (char*) my_malloc((size_t)cache->end_of_file + fmt_size, + MYF(0)))) { perror("Out of memory: can't allocate memory in " "copy_cache_to_string_wrapped()."); @@ -12027,7 +12028,8 @@ bool copy_cache_to_string_wrapped(IO_CACHE *cache, if (!do_wrap) { - if (my_b_read(cache, (uchar*) to->str, (to->length= cache->end_of_file))) + if (my_b_read(cache, (uchar*) to->str, + (to->length= (size_t)cache->end_of_file))) goto err; } else if (4 + sizeof(str_binlog) + cache_size + sizeof(fmt_delim) > @@ -12073,10 +12075,10 @@ bool copy_cache_to_string_wrapped(IO_CACHE *cache, char *str= to->str; str += (to->length= sprintf(str, str_binlog)); - if (my_b_read(cache, (uchar*) str, cache->end_of_file)) + if (my_b_read(cache, (uchar*) str, (size_t)cache->end_of_file)) goto err; str += cache->end_of_file; - to->length += cache->end_of_file; + to->length += (size_t)cache->end_of_file; if (!is_verbose) to->length += sprintf(str , fmt_delim, delimiter); }
participants (1)
-
Oleksandr Byelkin