Skip to content
Commit a1dd9a5f authored by Carles Cufi's avatar Carles Cufi Committed by Johan Hedberg
Browse files

bluetooth: host: Fix alignment of gatt_chrc



The following warning is issued by clang:

warning: field  within 'struct gatt_chrc' is less aligned than 'union
gatt_chrc::(anonymous at subsys/bluetooth/host/gatt.c:1859:2)' and
is usually due to 'struct gatt_chrc' being packed, which can lead
to unaligned accesses [-Wunaligned-access]

This is due to the fact that the uint16_t uuid field requires 2-byte
alignment but it is not marked as packed. Since the enclosing struct is
indeed packed, the required alignment is not guaranteed and so clang
complains. Fix it by ensuring that the union is marked as packed too.

Signed-off-by: default avatarCarles Cufi <carles.cufi@nordicsemi.no>
parent f18ea957
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment