mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-28 17:11:23 +02:00
Fix warnings. Needs alignment
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -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 register_app(int (*)(app_t *, uint8_t), const uint8_t *);
|
||||||
extern int select_app(const uint8_t *aid, size_t aid_len);
|
extern int select_app(const uint8_t *aid, size_t aid_len);
|
||||||
|
|
||||||
PACK(
|
|
||||||
typedef struct cmd {
|
typedef struct cmd {
|
||||||
uint8_t ins;
|
uint8_t ins;
|
||||||
int (*cmd_handler)(void);
|
int (*cmd_handler)(void);
|
||||||
}) cmd_t;
|
} cmd_t;
|
||||||
|
|
||||||
extern uint8_t num_apps;
|
extern uint8_t num_apps;
|
||||||
extern app_t apps[16];
|
extern app_t apps[16];
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ typedef struct {
|
|||||||
|
|
||||||
typedef int (*rest_route_handler_t)(const rest_request_t *request, rest_response_t *response);
|
typedef int (*rest_route_handler_t)(const rest_request_t *request, rest_response_t *response);
|
||||||
|
|
||||||
PACK(
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
rest_http_method_t method;
|
rest_http_method_t method;
|
||||||
const char *path;
|
const char *path;
|
||||||
@@ -167,7 +166,7 @@ typedef struct {
|
|||||||
rest_route_flags_t flags;
|
rest_route_flags_t flags;
|
||||||
rest_route_param_parser_t param_parser;
|
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_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 {
|
typedef struct {
|
||||||
rest_route_handler_t handler;
|
rest_route_handler_t handler;
|
||||||
|
|||||||
@@ -71,13 +71,12 @@ static pthread_t rest_thread;
|
|||||||
#endif
|
#endif
|
||||||
static rest_conn_t conns[REST_MAX_CONNS];
|
static rest_conn_t conns[REST_MAX_CONNS];
|
||||||
|
|
||||||
PACK(
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
volatile long pending;
|
volatile long pending;
|
||||||
rest_conn_t *conn;
|
rest_conn_t *conn;
|
||||||
rest_route_handler_t handler;
|
rest_route_handler_t handler;
|
||||||
rest_request_t request;
|
rest_request_t request;
|
||||||
}) rest_core1_job_t;
|
} rest_core1_job_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
rest_response_t response;
|
rest_response_t response;
|
||||||
@@ -115,11 +114,10 @@ static void rest_core1_job_pending_store(bool pending) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PACK(
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
rest_header_id_t id;
|
rest_header_id_t id;
|
||||||
const char *name;
|
const char *name;
|
||||||
}) rest_header_descriptor_t;
|
} rest_header_descriptor_t;
|
||||||
|
|
||||||
static const rest_header_descriptor_t rest_http_headers[REST_HEADER_TOTAL_COUNT] = {
|
static const rest_header_descriptor_t rest_http_headers[REST_HEADER_TOTAL_COUNT] = {
|
||||||
{ REST_HEADER_USER_AGENT, "User-Agent" },
|
{ REST_HEADER_USER_AGENT, "User-Agent" },
|
||||||
|
|||||||
Reference in New Issue
Block a user