From 2b2dcf34f7325872b03534ebca31c396f449330f Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Thu, 23 Apr 2020 18:31:32 +0300 Subject: fix buggy gcc warning on ARM https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89357 In short, alignas of big alignments doesn't work for gcc on ARM. The bug is fixed in gcc-9.3 and won't be fixed in older branches. F.ex gcc-7 is not supported already. --- storage/innobase/log/log0log.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index 5dafe916507..7c8c9f18a97 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -773,7 +773,7 @@ void log_t::file::write_header_durable(lsn_t lsn) log_sys.log.format == log_t::FORMAT_ENC_10_5); // man 2 open suggests this buffer to be aligned by 512 for O_DIRECT - alignas(OS_FILE_LOG_BLOCK_SIZE) byte buf[OS_FILE_LOG_BLOCK_SIZE] = {0}; + MY_ALIGNED(OS_FILE_LOG_BLOCK_SIZE) byte buf[OS_FILE_LOG_BLOCK_SIZE] = {0}; mach_write_to_4(buf + LOG_HEADER_FORMAT, log_sys.log.format); mach_write_to_4(buf + LOG_HEADER_SUBFORMAT, log_sys.log.subformat); -- cgit v1.2.1