继续修复编译警告

This commit is contained in:
anod 2023-04-27 15:09:10 +08:00
parent bf9ea0dea4
commit f2c0256754

View File

@ -24,6 +24,7 @@
#include "fs.h" #include "fs.h"
#include "util.h" #include "util.h"
#include "arm11/drivers/hid.h" #include "arm11/drivers/hid.h"
#include "arm11/drivers/mcu.h"
#include "arm11/console.h" #include "arm11/console.h"
#include "arm11/fmt.h" #include "arm11/fmt.h"
#include "drivers/gfx.h" #include "drivers/gfx.h"
@ -513,7 +514,7 @@ static inline void key_tips( key_remix_t *p, atp_boolean_t checking, atp_itemcfg
static atp_error_t select_krp( atp_callerdata_t, atp_counter_t index, atp_itemcfg_t *cfg ) static atp_error_t select_krp( atp_callerdata_t, atp_counter_t index, atp_itemcfg_t *cfg )
{ {
static char name[20]; static char name[20];
ee_snprintf(name, sizeof(name), "键位配置项%d", index+1); ee_snprintf(name, sizeof(name), "键位配置项%ld", index+1);
cfg->text = name; cfg->text = name;
cfg->value = index; cfg->value = index;
key_remix_t *p = &g_keyremixConfig[index]; key_remix_t *p = &g_keyremixConfig[index];
@ -546,7 +547,7 @@ static atp_error_t select_kcf( atp_callerdata_t p, atp_counter_t index, atp_item
cfg->text = "选择实机键位"; cfg->text = "选择实机键位";
if( kcfg->device_keys ) if( kcfg->device_keys )
{ {
for( int i=0; i < key_val_len; ++i) for( u8 i=0; i < key_val_len; ++i)
{ {
if( key_val[i] == kcfg->device_keys ) if( key_val[i] == kcfg->device_keys )
{ {
@ -593,7 +594,7 @@ static atp_error_t select_remixtype( atp_callerdata_t, atp_counter_t index, atp_
cfg->value = index; cfg->value = index;
return ATP_SUCCESS; return ATP_SUCCESS;
} }
static atp_error_t select_unikey( atp_callerdata_t str, atp_counter_t index, atp_itemcfg_t *cfg ) static atp_error_t select_unikey( atp_callerdata_t str, atp_counter_t, atp_itemcfg_t *cfg )
{ {
cfg->text = (atp_text_t)str; cfg->text = (atp_text_t)str;
cfg->value = 0; cfg->value = 0;
@ -836,7 +837,7 @@ static atp_pageopt_t serve_on_key( atp_callerdata_t data, atp_counter_t index, a
} }
else if( status == DISP_SETK ) else if( status == DISP_SETK )
{ {
ee_snprintf(tips, sizeof(tips), "编辑配置项%d", position+1); ee_snprintf(tips, sizeof(tips), "编辑配置项%ld", position+1);
key_remix_t *cur = &g_keyremixConfig[position]; key_remix_t *cur = &g_keyremixConfig[position];
res = atp_select( tips, 3, select_kcf, NULL, cur, field, 0, &field ); res = atp_select( tips, 3, select_kcf, NULL, cur, field, 0, &field );
if( res == ATP_SUCCESS ) if( res == ATP_SUCCESS )
@ -895,12 +896,12 @@ static atp_pageopt_t serve_on_key( atp_callerdata_t data, atp_counter_t index, a
keys_count = 1; keys_count = 1;
text = "HOME"; text = "HOME";
} }
else if( host > 1 & host != 3 ) // N3DS/N3DSLL/N2DSLL else if( host > 1 && host != 3 ) // N3DS/N3DSLL/N2DSLL
{ {
keys_count = 14; keys_count = 14;
} }
u8 selected = 31; u8 selected = 31;
for( int i=0; i < key_val_len; ++i ) for( u8 i=0; i < key_val_len; ++i )
{ {
if( key_val[i] == cur->device_keys ) if( key_val[i] == cur->device_keys )
{ {