处理编译器的报警

This commit is contained in:
anod 2022-10-14 21:32:52 +08:00
parent 70563d74b5
commit 479e6eb9cc
2 changed files with 3 additions and 3 deletions

View File

@ -336,7 +336,7 @@ atp_error_t atp_select( atp_text_t title, atp_counter_t cnt, atp_itemprovider_t
// 更新item_sel // 更新item_sel
item_sel = idx_top + item_sel % CONTAINER_MAX_LINES; item_sel = idx_top + item_sel % CONTAINER_MAX_LINES;
if( item_sel >= cnt ) item_sel = cnt-1; if( item_sel >= (int)cnt ) item_sel = cnt-1;
// 更新view // 更新view
REFRESH_PAGE; REFRESH_PAGE;

View File

@ -178,7 +178,7 @@ Result browseFiles(const char *const basePath, char selected[512])
atp_error_t error; atp_error_t error;
const u32 count = dList->num; const u32 count = dList->num;
if( count > 0 ) if( count > 0 )
error = atp_select( curDir, count, display_folder, NULL, (atp_callerdata_t)dList, value ); error = atp_select( curDir, count, display_folder, NULL, (atp_callerdata_t)dList, &value );
else error = atp_show( 1, display_empty, NULL ); else error = atp_show( 1, display_empty, NULL );
u32 pathLen = strlen(curDir); u32 pathLen = strlen(curDir);
@ -197,7 +197,7 @@ Result browseFiles(const char *const basePath, char selected[512])
else else
{ {
const char *fname = &dList->ptrs[value][1]; const char *fname = &dList->ptrs[value][1];
u32 namelen = strlen( &fname ) + 1; u32 namelen = strlen( fname ) + 1;
if( namelen + pathLen > DIRBUFFSIZE-1 ) if( namelen + pathLen > DIRBUFFSIZE-1 )
{ {
res = RES_OUT_OF_MEM; res = RES_OUT_OF_MEM;