Skip to content

Commit ffe3c75

Browse files
laurynas-biveinisinikep
authored andcommitted
Use PRIu64 for formatting a uint64_t variable (facebook#1206)
Summary: Pull Request resolved: facebook#1206 Reviewed By: luqun Differential Revision: D38956513 Pulled By: hermanlee fbshipit-source-id: d12ae43
1 parent 9a77235 commit ffe3c75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

storage/rocksdb/rdb_i_s.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/* C++ standard header files */
1818
#include <algorithm>
1919
#include <cctype>
20+
#include <cinttypes>
2021
#include <map>
2122
#include <string>
2223
#include <vector>
@@ -763,7 +764,7 @@ static int rdb_i_s_global_info_fill_table(
763764
char gtid_buf[GTID_BUF_LEN] = {0};
764765

765766
if (blm->read(file_buf, &pos, gtid_buf)) {
766-
snprintf(pos_buf, INT_BUF_LEN, "%lu", (uint64_t)pos);
767+
snprintf(pos_buf, INT_BUF_LEN, "%" PRIu64, (uint64_t)pos);
767768

768769
ret |= rdb_global_info_fill_row(thd, tables, "BINLOG", "FILE", file_buf);
769770
ret |= rdb_global_info_fill_row(thd, tables, "BINLOG", "POS", pos_buf);

0 commit comments

Comments
 (0)