From d272f61263950a0409b3e56c87b7abf5b84371c5 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Mon, 10 May 2021 19:49:32 +0900 Subject: [PATCH] cpu.h: Fix size of array element is not a multiple of its alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pointed out by gcc11. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1937076 Change-Id: Ia76204f759710651340bc09fa6bc163d776b2ab4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3902 Reviewed-by: Jérôme Duval --- headers/private/kernel/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/private/kernel/cpu.h b/headers/private/kernel/cpu.h index b8bf3df7d6..4243c09875 100644 --- a/headers/private/kernel/cpu.h +++ b/headers/private/kernel/cpu.h @@ -48,7 +48,7 @@ typedef struct cpu_topology_node { /* CPU local data structure */ -typedef struct cpu_ent { +typedef struct CACHE_LINE_ALIGN cpu_ent { int cpu_num; // thread.c: used to force a reschedule at quantum expiration time @@ -85,7 +85,7 @@ typedef struct cpu_ent { // arch-specific stuff arch_cpu_info arch; -} cpu_ent CACHE_LINE_ALIGN; +} cpu_ent; extern cpu_ent gCPU[];