mirror of
https://github.com/polhenarejos/pico-openpgp.git
synced 2026-05-28 09:01:25 +02:00
Apply strict build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -24,16 +24,16 @@
|
||||
|
||||
bool is_gpg = true;
|
||||
|
||||
int man_process_apdu();
|
||||
int man_unload();
|
||||
static int man_process_apdu(void);
|
||||
static int man_unload(void);
|
||||
|
||||
const uint8_t man_aid[] = {
|
||||
8,
|
||||
0xa0, 0x00, 0x00, 0x05, 0x27, 0x47, 0x11, 0x17
|
||||
};
|
||||
|
||||
extern void init_piv();
|
||||
int man_select(app_t *a, uint8_t force) {
|
||||
extern void init_piv(void);
|
||||
static int man_select(app_t *a, uint8_t force) {
|
||||
(void) force;
|
||||
a->process_apdu = man_process_apdu;
|
||||
a->unload = man_unload;
|
||||
@@ -49,7 +49,7 @@ INITIALIZER( man_ctor ) {
|
||||
register_app(man_select, man_aid);
|
||||
}
|
||||
|
||||
int man_unload() {
|
||||
static int man_unload(void) {
|
||||
return PICOKEY_OK;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ bool cap_supported(uint16_t cap) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int man_get_config() {
|
||||
int man_get_config(void) {
|
||||
file_t *ef = search_dynamic_file(EF_DEV_CONF);
|
||||
res_APDU_size = 0;
|
||||
res_APDU[res_APDU_size++] = 0; // Overall length. Filled later
|
||||
@@ -118,12 +118,12 @@ int man_get_config() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cmd_read_config() {
|
||||
static int cmd_read_config(void) {
|
||||
man_get_config();
|
||||
return SW_OK();
|
||||
}
|
||||
|
||||
int cmd_write_config() {
|
||||
static int cmd_write_config(void) {
|
||||
if (apdu.data[0] != apdu.nc - 1) {
|
||||
return SW_WRONG_DATA();
|
||||
}
|
||||
@@ -142,7 +142,7 @@ static const cmd_t cmds[] = {
|
||||
{ 0x00, 0x0 }
|
||||
};
|
||||
|
||||
int man_process_apdu() {
|
||||
static int man_process_apdu(void) {
|
||||
if (CLA(apdu) != 0x00) {
|
||||
return SW_CLA_NOT_SUPPORTED();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user