@@ -11959,7 +11959,7 @@ bool copy_cache_to_file_wrapped(IO_CACHE *body,
1195911959 contribution of non-compressed packet.
1196011960 */
1196111961 my_fprintf (file, fmt_frag, 0 );
11962- if (my_b_copy_to_file (body, file, cache_size/2 + 1 ))
11962+ if (my_b_copy_to_file (body, file, ( size_t ) cache_size/2 + 1 ))
1196311963 goto err;
1196411964 my_fprintf (file, fmt_n_delim, delimiter);
1196511965
@@ -12018,7 +12018,8 @@ bool copy_cache_to_string_wrapped(IO_CACHE *cache,
1201812018 if (reinit_io_cache (cache, READ_CACHE, 0L , FALSE , FALSE ))
1201912019 goto err;
1202012020
12021- if (!(to->str = (char *) my_malloc (cache->end_of_file + fmt_size, MYF (0 ))))
12021+ if (!(to->str = (char *) my_malloc ((size_t )cache->end_of_file + fmt_size,
12022+ MYF (0 ))))
1202212023 {
1202312024 perror (" Out of memory: can't allocate memory in "
1202412025 " copy_cache_to_string_wrapped()." );
@@ -12027,7 +12028,8 @@ bool copy_cache_to_string_wrapped(IO_CACHE *cache,
1202712028
1202812029 if (!do_wrap)
1202912030 {
12030- if (my_b_read (cache, (uchar*) to->str , (to->length = cache->end_of_file )))
12031+ if (my_b_read (cache, (uchar*) to->str ,
12032+ (to->length = (size_t )cache->end_of_file )))
1203112033 goto err;
1203212034 }
1203312035 else if (4 + sizeof (str_binlog) + cache_size + sizeof (fmt_delim) >
@@ -12073,10 +12075,10 @@ bool copy_cache_to_string_wrapped(IO_CACHE *cache,
1207312075 char *str= to->str ;
1207412076
1207512077 str += (to->length = sprintf (str, str_binlog));
12076- if (my_b_read (cache, (uchar*) str, cache->end_of_file ))
12078+ if (my_b_read (cache, (uchar*) str, ( size_t ) cache->end_of_file ))
1207712079 goto err;
1207812080 str += cache->end_of_file ;
12079- to->length += cache->end_of_file ;
12081+ to->length += ( size_t ) cache->end_of_file ;
1208012082 if (!is_verbose)
1208112083 to->length += sprintf (str , fmt_delim, delimiter);
1208212084 }
0 commit comments