Skip to content

Commit

Permalink
hw/cxl: Fix a QEMU_BUILD_BUG_ON() in switch statement scope issue.
Browse files Browse the repository at this point in the history
As _Static_assert is a declaration, it can't follow a label until C23.
Some older versions of GCC trip up on this one.

This check has no obvious purpose so just remove it.

Reported-by: Jeongtae Park <jtp.park@samsung.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20231023140210.3089-6-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
jic23 authored and mstsirkin committed Nov 7, 2023
1 parent b342489 commit 45234c2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion hw/cxl/cxl-component-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ void cxl_component_register_init_common(uint32_t *reg_state,
ARRAY_FIELD_DP32(reg_state, CXL_CAPABILITY_HEADER, ARRAY_SIZE, caps);

#define init_cap_reg(reg, id, version) \
QEMU_BUILD_BUG_ON(CXL_##reg##_REGISTERS_OFFSET == 0); \
do { \
int which = R_CXL_##reg##_CAPABILITY_HEADER; \
reg_state[which] = FIELD_DP32(reg_state[which], \
Expand Down

0 comments on commit 45234c2

Please sign in to comment.