From fc9bcc275f25d0ef2eee87163fce94489358952a Mon Sep 17 00:00:00 2001 From: David Korth Date: Sun, 20 Apr 2025 00:09:48 -0400 Subject: [PATCH] [cmake] gcc.cmake: -Wno-error=cast-align MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Ubuntu 16.04 Launchpad build for armhf failed due to a potential alignment issue: /<>/src/kde/AchQtDBus.cpp: In member function ‘int AchQtDBus::notifyFunc(LibRpBase::Achievements::ID)’: /<>/src/kde/AchQtDBus.cpp:149:59: error: cast from ‘uchar* {aka unsigned char*}’ to ‘LibRpTexture::argb32_t*’ increases required alignment of target type [-Werror=cast-align] argb32_t *bits = reinterpret_cast(icon.bits()); ^ This shouldn't be an actual problem, since rp_image's image data is always 16-byte aligned. NOTE: Not rebuilding the Ubuntu 16.04 packages for ARM because of this. (Both the armhf and arm64 builds were cancelled.) (cherry picked from commit 5a081313112feb79286372d1e2550b00f6f1383e) --- cmake/platform/gcc.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/platform/gcc.cmake b/cmake/platform/gcc.cmake index f63ce2010..c18e63d5b 100644 --- a/cmake/platform/gcc.cmake +++ b/cmake/platform/gcc.cmake @@ -276,7 +276,7 @@ ENDIF(CFLAG_OPTIMIZE_FTREE_VECTORIZE) # Add "-Werror" *after* checking for everything else. SET(RP_C_FLAGS_COMMON "${RP_C_FLAGS_COMMON} -Werror") SET(RP_CXX_FLAGS_COMMON "${RP_CXX_FLAGS_COMMON} -Werror") -SET(CFLAGS_WNO_ERROR -Wno-error=unknown-pragmas -Wno-error=address -Wno-error=attributes -Wno-error=unused-parameter -Wno-error=unused-but-set-variable -Wno-error=ignored-qualifiers -Wno-error=missing-field-initializers -Wno-error=unused-variable -Wno-error=unused-function -Wno-error=type-limits -Wno-error=empty-body -Wno-error=address-of-packed-member -Wno-error=shift-negative-value -Wno-error=clobbered -Wno-error=overloaded-virtual -Wno-error=header-hygiene) +SET(CFLAGS_WNO_ERROR -Wno-error=unknown-pragmas -Wno-error=address -Wno-error=attributes -Wno-error=unused-parameter -Wno-error=unused-but-set-variable -Wno-error=ignored-qualifiers -Wno-error=missing-field-initializers -Wno-error=unused-variable -Wno-error=unused-function -Wno-error=type-limits -Wno-error=empty-body -Wno-error=address-of-packed-member -Wno-error=shift-negative-value -Wno-error=clobbered -Wno-error=overloaded-virtual -Wno-error=header-hygiene -Wno-error=cast-align) FOREACH(FLAG_TEST ${CFLAGS_WNO_ERROR}) # CMake doesn't like certain characters in variable names. STRING(REGEX REPLACE "/|:|=" "_" FLAG_TEST_VARNAME "${FLAG_TEST}")