From 0bf3d0d769d1ab44ccdee5e304c19d94fd95ec48 Mon Sep 17 00:00:00 2001 From: Lena Voytek Date: Tue, 18 Aug 2026 14:13:57 -0400 Subject: [PATCH] Fix big-endian build failure due to incorrect variable name The implementation of uint4korr() in binary_log.cc for big-endian architectures uses the local variable name ptr, which matches little-endian. However it is referred to in the function as A. Fix the references in the function to fix build failures. --- mysqlshdk/libs/db/mysql/binary_log.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysqlshdk/libs/db/mysql/binary_log.cc b/mysqlshdk/libs/db/mysql/binary_log.cc index 821693071..ed21cacf4 100644 --- a/mysqlshdk/libs/db/mysql/binary_log.cc +++ b/mysqlshdk/libs/db/mysql/binary_log.cc @@ -74,9 +74,9 @@ bool is_supported_server_version(const mysqlshdk::utils::Version &version) { #if IS_BIG_ENDIAN inline uint32_t uint4korr(const unsigned char *ptr) { - return static_cast(A[0]) | (static_cast(A[1]) << 8) | - (static_cast(A[2]) << 16) | - (static_cast(A[3]) << 24); + return static_cast(ptr[0]) | (static_cast(ptr[1]) << 8) | + (static_cast(ptr[2]) << 16) | + (static_cast(ptr[3]) << 24); } #else inline uint32_t uint4korr(const unsigned char *ptr) {