From de5623104baee6e0c13c92f05c15bf4b4145c0b1 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Wed, 18 Aug 2021 20:27:40 +0300 Subject: [PATCH] umbim: fix compilation with GCC 10 When building umbim with GCC 10, a bunch of these errors appear: cli.c: In function 'mbim_device_caps_response': cli.c:55:29: error: taking address of packed member of 'struct mbim_basic_connect_device_caps_r' may result in an unaligned pointer value [-Werror=address-of-packed-member] 55 | deviceid = mbim_get_string(&caps->deviceid, buffer); | ^~~~~~~~~~~~~~~ Fix them by disabling padding between fields of struct mbim_string. Acked-by: John Crispin Signed-off-by: Stijn Tintel --- mbim-type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mbim-type.h b/mbim-type.h index ddc36fa..fdbe684 100644 --- a/mbim-type.h +++ b/mbim-type.h @@ -18,7 +18,7 @@ struct mbim_string { uint32_t offset; uint32_t length; -}; +} __attribute__((packed)); struct mbim_enum { uint32_t key; -- 2.30.2