Fix warnings.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2025-10-12 18:56:14 +02:00
parent 898c88dc6d
commit 6b93938040
10 changed files with 20 additions and 18 deletions

View File

@@ -104,7 +104,8 @@ int cbor_parse(uint8_t cmd, const uint8_t *data, size_t len) {
return CTAP1_ERR_INVALID_CMD;
}
void cbor_thread(void) {
void *cbor_thread(void *arg) {
(void)arg;
card_init_core1();
while (1) {
uint32_t m;
@@ -115,17 +116,17 @@ void cbor_thread(void) {
if (m == EV_EXIT) {
break;
}
apdu.sw = cbor_parse(cbor_cmd, cbor_data, cbor_len);
apdu.sw = (uint16_t)cbor_parse(cbor_cmd, cbor_data, cbor_len);
if (apdu.sw == 0) {
DEBUG_DATA(res_APDU, res_APDU_size);
}
else {
if (apdu.sw >= CTAP1_ERR_INVALID_CHANNEL) {
res_APDU[-1] = apdu.sw;
res_APDU[-1] = (uint8_t)apdu.sw;
apdu.sw = 0;
}
else {
res_APDU[0] = apdu.sw;
res_APDU[0] = (uint8_t)apdu.sw;
}
}
@@ -137,6 +138,7 @@ void cbor_thread(void) {
#ifdef ESP_PLATFORM
vTaskDelete(NULL);
#endif
return NULL;
}
int cbor_process(uint8_t last_cmd, const uint8_t *data, size_t len) {