Skip to content

Commit

Permalink
MDEV-28231: innodb: format string warning on aix UINT64PFx (ib_id_t)
Browse files Browse the repository at this point in the history
ib_id_t is a uint64. On AIX this isn't a long long unsigned and to
prevent the compile warnings and potential wrong type, the UINT64PFx
defination is corrected.

As INT64PF is unused (last use, xtradb in 10.2), it is removed to
remove the confusion that INT64PF and UINT64PFx would be different
types otherwise.
  • Loading branch information
grooverdan authored and dr-m committed Apr 4, 2022
1 parent 7d7bdd4 commit 7f5a3cd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions storage/innobase/include/univ.i
Original file line number Diff line number Diff line change
Expand Up @@ -400,22 +400,19 @@ typedef ssize_t lint;
#ifdef _WIN32
/* Use the integer types and formatting strings defined in Visual Studio. */
# define UINT32PF "%u"
# define INT64PF "%lld"
# define UINT64scan "llu"
# define UINT64PFx "%016llx"
#elif defined __APPLE__
/* Apple prefers to call the 64-bit types 'long long'
in both 32-bit and 64-bit environments. */
# define UINT32PF "%" PRIu32
# define INT64PF "%lld"
# define UINT64scan "llu"
# define UINT64PFx "%016llx"
#elif defined _AIX
/* Workaround for macros expension trouble */
# define UINT32PF "%u"
# define INT64PF "%lld"
# define UINT64scan "lu"
# define UINT64PFx "%016llx"
# define UINT64PFx "%016lx"
#else
/* Use the integer types and formatting strings defined in the C99 standard. */
# define UINT32PF "%" PRIu32
Expand Down

0 comments on commit 7f5a3cd

Please sign in to comment.