From 3d55f3a9915e3940953e4ae2f594afd01d202d98 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Thu, 14 May 2026 20:13:57 +0200 Subject: [PATCH] Fix warnings. Needs alignment Signed-off-by: Pol Henarejos --- src/apdu.h | 3 +-- src/usb/lwip/rest.h | 3 +-- src/usb/lwip/rest_server.c | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/apdu.h b/src/apdu.h index 88c9526..f0c8375 100644 --- a/src/apdu.h +++ b/src/apdu.h @@ -34,11 +34,10 @@ extern bool app_exists(const uint8_t *aid, size_t aid_len); extern int register_app(int (*)(app_t *, uint8_t), const uint8_t *); extern int select_app(const uint8_t *aid, size_t aid_len); -PACK( typedef struct cmd { uint8_t ins; int (*cmd_handler)(void); -}) cmd_t; +} cmd_t; extern uint8_t num_apps; extern app_t apps[16]; diff --git a/src/usb/lwip/rest.h b/src/usb/lwip/rest.h index f59b2f5..832d350 100644 --- a/src/usb/lwip/rest.h +++ b/src/usb/lwip/rest.h @@ -159,7 +159,6 @@ typedef struct { typedef int (*rest_route_handler_t)(const rest_request_t *request, rest_response_t *response); -PACK( typedef struct { rest_http_method_t method; const char *path; @@ -167,7 +166,7 @@ typedef struct { rest_route_flags_t flags; rest_route_param_parser_t param_parser; rest_session_role_t role; // Minimum required role to access this route (only relevant if REST_ROUTE_REQUIRE_AUTH flag is set) -}) rest_route_t; +} rest_route_t; typedef struct { rest_route_handler_t handler; diff --git a/src/usb/lwip/rest_server.c b/src/usb/lwip/rest_server.c index 5676294..e031f1e 100644 --- a/src/usb/lwip/rest_server.c +++ b/src/usb/lwip/rest_server.c @@ -71,13 +71,12 @@ static pthread_t rest_thread; #endif static rest_conn_t conns[REST_MAX_CONNS]; -PACK( typedef struct { volatile long pending; rest_conn_t *conn; rest_route_handler_t handler; rest_request_t request; -}) rest_core1_job_t; +} rest_core1_job_t; typedef struct { rest_response_t response; @@ -115,11 +114,10 @@ static void rest_core1_job_pending_store(bool pending) { #endif } -PACK( typedef struct { rest_header_id_t id; const char *name; -}) rest_header_descriptor_t; +} rest_header_descriptor_t; static const rest_header_descriptor_t rest_http_headers[REST_HEADER_TOTAL_COUNT] = { { REST_HEADER_USER_AGENT, "User-Agent" },