From 91dfe9325d976652790a7d33ba5ef93ec0a8d410 Mon Sep 17 00:00:00 2001 From: anod <182859762@qq.com> Date: Mon, 16 Jan 2023 20:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E4=BF=AE=E5=A4=8D=E5=89=A9?= =?UTF-8?q?=E4=B8=8B=E7=9A=84warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/arm11/acl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/arm11/acl.c b/source/arm11/acl.c index 998f604..3990169 100644 --- a/source/arm11/acl.c +++ b/source/arm11/acl.c @@ -127,7 +127,7 @@ static int32_t bin_search( acl_text_t game ) return -ACHTLIB_INVALID; } - int size = ACL_SERIAL_LEN(gblcht.serc); + uint32_t size = ACL_SERIAL_LEN(gblcht.serc); char *serials = (char*)malloc( size ); if( serials == NULL ){ return -ACHTLIB_NOMEM; @@ -193,7 +193,7 @@ acl_error_t acl_select_game( acl_text_t game, acl_boolean_t filter, acl_count_t offset = ACL_HEADER_LEN + ACL_SERIAL_LEN(inst->serc) + ACL_INDEX_OFFSET(inst->serc+1); offset += ACL_CONFIG_OFFSET(groups[0]); - uint32_t gcount = groups[1] - groups[0]; + int32_t gcount = groups[1] - groups[0]; if( RES_OK != fLseek(inst->fd, offset) ) return ACHTLIB_INVALID; @@ -208,7 +208,7 @@ acl_error_t acl_select_game( acl_text_t game, acl_boolean_t filter, acl_count_t { char reg = game[3]; index = -1; - for( int i=0; i < gcount; ++i ) + for( int32_t i=0; i < gcount; ++i ) { if( config_type(cfg[i].typeloc) == reg ) { @@ -302,8 +302,8 @@ static acl_error_t load_data() gblset.entdata = NULL; } - int elemlen = gblset.entry.entid > 0xffff ? sizeof(uint32_t) : sizeof(uint16_t); - int total = gblset.entry.datasz * elemlen; + uint32_t elemlen = gblset.entry.entid > 0xffff ? sizeof(uint32_t) : sizeof(uint16_t); + uint32_t total = gblset.entry.datasz * elemlen; if( total == 0 ) return ACHTLIB_SUCCESS; uint8_t *d = (uint8_t*)malloc( total ); @@ -369,7 +369,7 @@ acl_error_t acl_select_entry( acl_entryid_t id, acl_elemlen_t *count) CheatEntry cache[READ_CACHE_SIZE]; uint32_t readed; - for( int i = 0; i < gblset.entc; i += READ_CACHE_SIZE ) + for( uint32_t i = 0; i < gblset.entc; i += READ_CACHE_SIZE ) { if( RES_OK != fRead(gblcht.fd, cache, sizeof(cache), &readed) || readed != sizeof(cache) )