@@ -1844,7 +1844,7 @@ void do_copy_file(struct st_command *command)
1844
1844
1845
1845
void do_chmod_file (struct st_command * command )
1846
1846
{
1847
- ulong mode = 0 ;
1847
+ long mode = 0 ;
1848
1848
static DYNAMIC_STRING ds_mode ;
1849
1849
static DYNAMIC_STRING ds_file ;
1850
1850
const struct command_arg chmod_file_args [] = {
@@ -1864,7 +1864,7 @@ void do_chmod_file(struct st_command *command)
1864
1864
die ("You must write a 4 digit octal number for mode" );
1865
1865
1866
1866
DBUG_PRINT ("info" , ("chmod %o %s" , (uint )mode , ds_file .str ));
1867
- handle_command_error (command , chmod (ds_file .str , mode ));
1867
+ handle_command_error (command , chmod (ds_file .str , ( mode_t ) mode ));
1868
1868
dynstr_free (& ds_mode );
1869
1869
dynstr_free (& ds_file );
1870
1870
DBUG_VOID_RETURN ;
@@ -6275,7 +6275,8 @@ typedef struct st_replace_found {
6275
6275
6276
6276
6277
6277
void replace_strings_append (REPLACE * rep , DYNAMIC_STRING * ds ,
6278
- const char * str , int len )
6278
+ const char * str ,
6279
+ int len __attribute__((unused )))
6279
6280
{
6280
6281
reg1 REPLACE * rep_pos ;
6281
6282
reg2 REPLACE_STRING * rep_str ;
@@ -6666,7 +6667,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
6666
6667
we need at least what we have so far in the buffer + the part
6667
6668
before this match
6668
6669
*/
6669
- need_buf_len = (res_p - buf ) + subs [0 ].rm_so ;
6670
+ need_buf_len = (res_p - buf ) + ( int ) subs [0 ].rm_so ;
6670
6671
6671
6672
/* on this pass, calculate the memory for the result buffer */
6672
6673
while (expr_p < replace_end )
@@ -6676,17 +6677,17 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
6676
6677
6677
6678
if (c == '\\' && expr_p + 1 < replace_end )
6678
6679
{
6679
- back_ref_num = expr_p [1 ] - '0' ;
6680
+ back_ref_num = ( int ) ( expr_p [1 ] - '0' ) ;
6680
6681
}
6681
6682
6682
6683
/* found a valid back_ref (eg. \1)*/
6683
6684
if (back_ref_num >= 0 && back_ref_num <= (int )r .re_nsub )
6684
6685
{
6685
- int start_off ,end_off ;
6686
+ regoff_t start_off , end_off ;
6686
6687
if ((start_off = subs [back_ref_num ].rm_so ) > -1 &&
6687
6688
(end_off = subs [back_ref_num ].rm_eo ) > -1 )
6688
6689
{
6689
- need_buf_len += (end_off - start_off );
6690
+ need_buf_len += (int ) ( end_off - start_off );
6690
6691
}
6691
6692
expr_p += 2 ;
6692
6693
}
@@ -6706,7 +6707,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
6706
6707
/* copy the pre-match part */
6707
6708
if (subs [0 ].rm_so )
6708
6709
{
6709
- memcpy (res_p , str_p , subs [0 ].rm_so );
6710
+ memcpy (res_p , str_p , ( size_t ) subs [0 ].rm_so );
6710
6711
res_p += subs [0 ].rm_so ;
6711
6712
}
6712
6713
0 commit comments