Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change position and size parameters to size_t to avoid 64-bit system compiler warnings #5873

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions examples/porting/lv_port_fs_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ static void fs_init(void);

static void * fs_open(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode);
static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p);
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, size_t btr, size_t * br);
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, size_t btw, size_t * bw);
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence);
static lv_fs_res_t fs_size(lv_fs_drv_t * drv, void * file_p, uint32_t * size_p);
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
static lv_fs_res_t fs_size(lv_fs_drv_t * drv, void * file_p, size_t * size_p);
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, size_t * pos_p);

static void * fs_dir_open(lv_fs_drv_t * drv, const char * path);
static lv_fs_res_t fs_dir_read(lv_fs_drv_t * drv, void * rddir_p, char * fn, uint32_t fn_len);
Expand Down Expand Up @@ -148,7 +148,7 @@ static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p)
* @param br the real number of read bytes (Byte Read)
* @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
*/
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br)
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, size_t btr, size_t * br)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;

Expand All @@ -166,7 +166,7 @@ static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_
* @param bw the number of real written bytes (Bytes Written). NULL if unused.
* @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
*/
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw)
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, size_t btw, size_t * bw)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;

Expand All @@ -183,7 +183,7 @@ static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf,
* @param whence tells from where to interpret the `pos`. See @lv_fs_whence_t
* @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
*/
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence)
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, size_t pos, lv_fs_whence_t whence)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;

Expand All @@ -198,7 +198,7 @@ static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs
* @param pos_p pointer to store the result
* @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
*/
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p)
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, size_t * pos_p)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;

Expand Down
10 changes: 5 additions & 5 deletions src/draw/vg_lite/lv_vg_lite_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ static lv_result_t decoder_open_file(lv_image_decoder_t * decoder, lv_image_deco

/* get real src header */
lv_image_header_t src_header;
uint32_t header_br = 0;
size_t header_br = 0;
res = lv_fs_read(&file, &src_header, sizeof(src_header), &header_br);
if(res != LV_FS_RES_OK || header_br != sizeof(src_header)) {
LV_LOG_ERROR("read %s lv_image_header_t failed", path);
Expand Down Expand Up @@ -305,11 +305,11 @@ static lv_result_t decoder_open_file(lv_image_decoder_t * decoder, lv_image_deco
uint32_t palette_size_bytes = palette_size * sizeof(lv_color32_t);

/* read palette */
uint32_t palette_br = 0;
size_t palette_br = 0;
res = lv_fs_read(&file, dest, palette_size_bytes, &palette_br);
if(res != LV_FS_RES_OK || palette_br != palette_size_bytes) {
LV_LOG_ERROR("read %s (palette: %" LV_PRIu32 ", br: %" LV_PRIu32 ") failed",
path, palette_size_bytes, palette_br);
path, palette_size_bytes, (uint32_t)palette_br);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%zu

goto failed;
}

Expand All @@ -329,11 +329,11 @@ static lv_result_t decoder_open_file(lv_image_decoder_t * decoder, lv_image_deco
dest += DEST_IMG_OFFSET;

for(uint32_t y = 0; y < height; y++) {
uint32_t br = 0;
size_t br = 0;
res = lv_fs_read(&file, src_temp, src_stride, &br);
if(res != LV_FS_RES_OK || br != src_stride) {
LV_LOG_ERROR("read %s (y: %" LV_PRIu32 ", src_stride: %" LV_PRIu32 ", br: %" LV_PRIu32 ") failed",
path, y, src_stride, br);
path, y, src_stride, (uint32_t)br);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use %zu

goto failed;
}

Expand Down
38 changes: 20 additions & 18 deletions src/libs/bin_decoder/lv_bin_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static lv_result_t decode_indexed_line(lv_color_format_t color_format, const lv_
int32_t w_px, const uint8_t * in, lv_color32_t * out);
static lv_result_t decode_compressed(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc);

static lv_fs_res_t fs_read_file_at(lv_fs_file_t * f, uint32_t pos, void * buff, uint32_t btr, uint32_t * br);
static lv_fs_res_t fs_read_file_at(lv_fs_file_t * f, size_t pos, void * buff, size_t btr, size_t * br);

static lv_result_t decompress_image(lv_image_decoder_dsc_t * dsc, const lv_image_compressed_t * compressed);

Expand Down Expand Up @@ -123,7 +123,7 @@ lv_result_t lv_bin_decoder_info(lv_image_decoder_t * decoder, const void * src,
lv_fs_file_t f;
lv_fs_res_t res = lv_fs_open(&f, src, LV_FS_MODE_RD);
if(res == LV_FS_RES_OK) {
uint32_t rn;
size_t rn;
res = lv_fs_read(&f, header, sizeof(lv_image_header_t), &rn);
lv_fs_close(&f);
if(res != LV_FS_RES_OK || rn != sizeof(lv_image_header_t)) {
Expand Down Expand Up @@ -550,11 +550,11 @@ static lv_result_t decode_indexed(lv_image_decoder_t * decoder, lv_image_decoder
{
LV_UNUSED(decoder); /*Unused*/
lv_result_t res;
uint32_t rn;
size_t rn;
decoder_data_t * decoder_data = dsc->user_data;
lv_fs_file_t * f = decoder_data->f;
lv_color_format_t cf = dsc->header.cf;
uint32_t palette_len = sizeof(lv_color32_t) * LV_COLOR_INDEXED_PALETTE_SIZE(cf);
size_t palette_len = sizeof(lv_color32_t) * LV_COLOR_INDEXED_PALETTE_SIZE(cf);
const lv_color32_t * palette;
const uint8_t * indexed_data = NULL;
lv_draw_buf_t * draw_buf_indexed = NULL;
Expand Down Expand Up @@ -593,14 +593,14 @@ static lv_result_t decode_indexed(lv_image_decoder_t * decoder, lv_image_decoder

indexed_data = draw_buf_indexed->data;

uint32_t data_len = 0;
size_t data_len = 0;
if(lv_fs_seek(f, 0, LV_FS_SEEK_END) != LV_FS_RES_OK ||
lv_fs_tell(f, &data_len) != LV_FS_RES_OK) {
LV_LOG_WARN("Failed to get file to size");
goto exit_with_buf;
}

uint32_t data_offset = sizeof(lv_image_header_t) + palette_len;
size_t data_offset = sizeof(lv_image_header_t) + palette_len;
data_len -= data_offset;
res = fs_read_file_at(f, data_offset, (uint8_t *)indexed_data, data_len, &rn);
if(res != LV_FS_RES_OK || rn != data_len) {
Expand Down Expand Up @@ -678,7 +678,7 @@ static lv_result_t load_indexed(lv_image_decoder_t * decoder, lv_image_decoder_d
LV_UNUSED(decoder); /*Unused*/

lv_result_t res;
uint32_t rn;
size_t rn;
decoder_data_t * decoder_data = dsc->user_data;

if(dsc->header.flags & LV_IMAGE_FLAGS_COMPRESSED) {
Expand Down Expand Up @@ -722,23 +722,23 @@ static lv_result_t load_indexed(lv_image_decoder_t * decoder, lv_image_decoder_d
}

uint8_t * data = decoded->data;
uint32_t palette_len = sizeof(lv_color32_t) * LV_COLOR_INDEXED_PALETTE_SIZE(cf);
size_t palette_len = sizeof(lv_color32_t) * LV_COLOR_INDEXED_PALETTE_SIZE(cf);
res = fs_read_file_at(f, sizeof(lv_image_header_t), data, palette_len, &rn);
if(res != LV_FS_RES_OK || rn != palette_len) {
LV_LOG_WARN("Read palette failed: %d", res);
lv_draw_buf_destroy(decoded);
return LV_RESULT_INVALID;
}

uint32_t data_len = 0;
size_t data_len = 0;
if(lv_fs_seek(f, 0, LV_FS_SEEK_END) != LV_FS_RES_OK ||
lv_fs_tell(f, &data_len) != LV_FS_RES_OK) {
LV_LOG_WARN("Failed to get file to size");
lv_draw_buf_destroy(decoded);
return LV_RESULT_INVALID;
}

uint32_t data_offset = sizeof(lv_image_header_t) + palette_len;
size_t data_offset = sizeof(lv_image_header_t) + palette_len;
data_len -= data_offset;
data += palette_len;
res = fs_read_file_at(f, data_offset, data, data_len, &rn);
Expand Down Expand Up @@ -780,7 +780,7 @@ static lv_result_t decode_rgb(lv_image_decoder_t * decoder, lv_image_decoder_dsc

uint8_t * img_data = decoded->data;

uint32_t rn;
size_t rn;
res = fs_read_file_at(f, sizeof(lv_image_header_t), img_data, len, &rn);
if(res != LV_FS_RES_OK || rn != len) {
LV_LOG_WARN("Read rgb file failed: %d", res);
Expand Down Expand Up @@ -815,7 +815,7 @@ static lv_result_t decode_alpha_only(lv_image_decoder_t * decoder, lv_image_deco
{
LV_UNUSED(decoder);
lv_result_t res;
uint32_t rn;
size_t rn;
decoder_data_t * decoder_data = dsc->user_data;
uint8_t bpp = lv_color_format_get_bpp(dsc->header.cf);
uint32_t w = (dsc->header.stride * 8) / bpp;
Expand Down Expand Up @@ -884,9 +884,9 @@ static lv_result_t decode_alpha_only(lv_image_decoder_t * decoder, lv_image_deco
static lv_result_t decode_compressed(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc)
{
#if LV_BIN_DECODER_RAM_LOAD
uint32_t rn;
uint32_t len;
uint32_t compressed_len;
size_t rn;
size_t len;
size_t compressed_len;
decoder_data_t * decoder_data = get_decoder_data(dsc);
lv_result_t res;
uint8_t * file_buf = NULL;
Expand Down Expand Up @@ -915,7 +915,8 @@ static lv_result_t decode_compressed(lv_image_decoder_t * decoder, lv_image_deco
}

if(compressed->compressed_size != compressed_len) {
LV_LOG_WARN("Compressed size mismatch: %" LV_PRIu32" != %" LV_PRIu32, compressed->compressed_size, compressed_len);
LV_LOG_WARN("Compressed size mismatch: %" LV_PRIu32" != %" LV_PRIu32, compressed->compressed_size,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%zu

(uint32_t)compressed_len);
return LV_RESULT_INVALID;
}

Expand Down Expand Up @@ -947,7 +948,8 @@ static lv_result_t decode_compressed(lv_image_decoder_t * decoder, lv_image_deco
lv_memcpy(compressed, image->data, len);
compressed->data = image->data + len;
if(compressed->compressed_size != compressed_len) {
LV_LOG_WARN("Compressed size mismatch: %" LV_PRIu32" != %" LV_PRIu32, compressed->compressed_size, compressed_len);
LV_LOG_WARN("Compressed size mismatch: %" LV_PRIu32" != %" LV_PRIu32, compressed->compressed_size,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%zu

(uint32_t)compressed_len);
return LV_RESULT_INVALID;
}
}
Expand Down Expand Up @@ -1046,7 +1048,7 @@ static lv_result_t decode_indexed_line(lv_color_format_t color_format, const lv_
return LV_RESULT_OK;
}

static lv_fs_res_t fs_read_file_at(lv_fs_file_t * f, uint32_t pos, void * buff, uint32_t btr, uint32_t * br)
static lv_fs_res_t fs_read_file_at(lv_fs_file_t * f, size_t pos, void * buff, size_t btr, size_t * br)
{
lv_fs_res_t res;
if(br) *br = 0;
Expand Down
16 changes: 8 additions & 8 deletions src/libs/fsdrv/lv_fs_fatfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ static void fs_init(void);

static void * fs_open(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode);
static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p);
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence);
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, size_t btr, size_t * br);
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, size_t btw, size_t * bw);
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, size_t pos, lv_fs_whence_t whence);
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, size_t * pos_p);
static void * fs_dir_open(lv_fs_drv_t * drv, const char * path);
static lv_fs_res_t fs_dir_read(lv_fs_drv_t * drv, void * dir_p, char * fn, uint32_t fn_len);
static lv_fs_res_t fs_dir_close(lv_fs_drv_t * drv, void * dir_p);
Expand Down Expand Up @@ -148,7 +148,7 @@ static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p)
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br)
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, size_t btr, size_t * br)
{
LV_UNUSED(drv);
FRESULT res = f_read(file_p, buf, btr, (UINT *)br);
Expand All @@ -165,7 +165,7 @@ static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_
* @param bw the number of real written bytes (Bytes Written). NULL if unused.
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw)
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, size_t btw, size_t * bw)
{
LV_UNUSED(drv);
FRESULT res = f_write(file_p, buf, btw, (UINT *)bw);
Expand All @@ -182,7 +182,7 @@ static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf,
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence)
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, size_t pos, lv_fs_whence_t whence)
{
LV_UNUSED(drv);
switch(whence) {
Expand All @@ -209,7 +209,7 @@ static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p)
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, size_t * pos_p)
{
LV_UNUSED(drv);
*pos_p = f_tell((FIL *)file_p);
Expand Down
12 changes: 6 additions & 6 deletions src/libs/fsdrv/lv_fs_littlefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ typedef struct LittleFile {
**********************/
static void * fs_open(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode);
static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p);
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, size_t btr, size_t * br);
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, size_t btw, size_t * bw);
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence);
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);

Expand Down Expand Up @@ -109,7 +109,7 @@ static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p)
* @param br the real number of read bytes (Byte Read)
* @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
*/
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br)
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, size_t btr, size_t * br)
{
LV_UNUSED(drv);
LittleFile * lf = (LittleFile *)file_p;
Expand All @@ -129,7 +129,7 @@ static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_
* @param bw the number of real written bytes (Bytes Written)
* @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
*/
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw)
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, size_t btw, size_t * bw)
{
LV_UNUSED(drv);
LittleFile * lf = (LittleFile *)file_p;
Expand All @@ -148,7 +148,7 @@ static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf,
* @param whence tells from where to interpret the `pos`. See @lv_fs_whence_t
* @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
*/
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence)
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, size_t pos, lv_fs_whence_t whence)
{
LV_UNUSED(drv);
int mode;
Expand All @@ -174,7 +174,7 @@ static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs
* @param pos_p pointer to store the result
* @return LV_FS_RES_OK: no error or any error from @lv_fs_res_t enum
*/
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p)
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, size_t * pos_p)
{
LV_UNUSED(drv);
LittleFile * lf = (LittleFile *)file_p;
Expand Down
12 changes: 6 additions & 6 deletions src/libs/fsdrv/lv_fs_memfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@

static void * fs_open(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode);
static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p);
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence);
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, size_t btr, size_t * br);
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, size_t pos, lv_fs_whence_t whence);
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, size_t * pos_p);

/**********************
* STATIC VARIABLES
Expand Down Expand Up @@ -146,7 +146,7 @@ static lv_fs_res_t fs_close(lv_fs_drv_t * drv, void * file_p)
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br)
static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, size_t btr, size_t * br)
{
LV_UNUSED(drv);
LV_UNUSED(file_p);
Expand All @@ -164,7 +164,7 @@ static lv_fs_res_t fs_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence)
static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, size_t pos, lv_fs_whence_t whence)
{
/* NOTE: this function is only called to determine the end of the buffer when LV_FS_SEEK_END was given to lv_fs_seek() */
LV_UNUSED(drv);
Expand Down Expand Up @@ -198,7 +198,7 @@ static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p)
static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, size_t * pos_p)
{
LV_UNUSED(drv);
*pos_p = ((lv_fs_file_t *)file_p)->cache->file_position;
Expand Down
Loading
Loading