Skip to content

Commit

Permalink
compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Mar 10, 2017
1 parent 0094b65 commit b6a1d65
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions storage/connect/ha_connect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1034,15 +1034,15 @@ char *GetListOption(PGLOBAL g, const char *opname,
pv= strchr(pk, '=');

if (pv && (!pn || pv < pn)) {
n= MY_MIN(pv - pk, sizeof(key) - 1);
n= MY_MIN(static_cast<size_t>(pv - pk), sizeof(key) - 1);
memcpy(key, pk, n);
key[n]= 0;
pv++;
n= MY_MIN((pn ? pn - pv : strlen(pv)), sizeof(val) - 1);
n= MY_MIN((pn ? pn - pv : strlen(pv)), sizeof(val) - 1);
memcpy(val, pv, n);
val[n]= 0;
} else {
n= MY_MIN((pn ? pn - pk : strlen(pk)), sizeof(key) - 1);
n= MY_MIN((pn ? pn - pk : strlen(pk)), sizeof(key) - 1);
memcpy(key, pk, n);
key[n]= 0;
val[0]= 0;
Expand Down
4 changes: 2 additions & 2 deletions storage/innobase/log/log0crypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ log_crypt_print_checkpoint_keys(

if (crypt_info.size()) {
fprintf(stderr,
"InnoDB: redo log checkpoint: %llu [ chk key ]: ",
"InnoDB: redo log checkpoint: " UINT64PF " [ chk key ]: ",
checkpoint_no);
for (size_t i = 0; i < crypt_info.size(); i++) {
struct crypt_info_t* it = &crypt_info[i];
fprintf(stderr, "[ %llu %u ] ",
fprintf(stderr, "[ " UINT64PF " %u ] ",
it->checkpoint_no,
it->key_version);
}
Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/os/os0file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6280,7 +6280,7 @@ os_file_trim(
srv_use_trim = FALSE;
ib_logf(IB_LOG_LEVEL_WARN,
"fallocate() failed with error %d."
" start: %llu len: " ULINTPF " payload: " ULINTPF "."
" start: " UINT64PF " len: " ULINTPF " payload: " ULINTPF "."
" Disabling fallocate for now.",
errno, off, ulint(trim_len), ulint(len));

Expand Down
4 changes: 2 additions & 2 deletions storage/xtradb/log/log0crypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ log_crypt_print_checkpoint_keys(

if (crypt_info.size()) {
fprintf(stderr,
"InnoDB: redo log checkpoint: %llu [ chk key ]: ",
"InnoDB: redo log checkpoint: " UINT64PF " [ chk key ]: ",
checkpoint_no);
for (size_t i = 0; i < crypt_info.size(); i++) {
struct crypt_info_t* it = &crypt_info[i];
fprintf(stderr, "[ %llu %u ] ",
fprintf(stderr, "[ " UINT64PF " %u ] ",
it->checkpoint_no,
it->key_version);
}
Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/os/os0file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6394,7 +6394,7 @@ os_file_trim(
srv_use_trim = FALSE;
ib_logf(IB_LOG_LEVEL_WARN,
"fallocate() failed with error %d."
" start: %llu len: " ULINTPF " payload: " ULINTPF "."
" start: " UINT64PF " len: " ULINTPF " payload: " ULINTPF "."
" Disabling fallocate for now.",
errno, off, ulint(trim_len), ulint(len));

Expand Down

0 comments on commit b6a1d65

Please sign in to comment.