From 423350ec4dfba02dad9b91d5560b192cc51b8ad0 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 30 Jun 2024 18:17:34 -0400 Subject: xrick: Fix various errors/warnings * Piles of warnings in miniz when built with modern toolchain * Pointer arithematic error in PRNG * Casting between int and void * for file descriptors * Warning on non-color targets Remaining: * Failure on XRGB888 LCDs due to issue with core LCD macros * Failure on interleaved greyscale LCDs (?) * HTML manual build failure Change-Id: Ibf6d2c001ec8daf583731d5da15b86b5352773e7 --- apps/plugins/xrick/system/sysfile_rockbox.c | 8 ++++---- apps/plugins/xrick/system/sysvid_rockbox.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'apps/plugins/xrick/system') diff --git a/apps/plugins/xrick/system/sysfile_rockbox.c b/apps/plugins/xrick/system/sysfile_rockbox.c index 72227d5301..06227caec1 100644 --- a/apps/plugins/xrick/system/sysfile_rockbox.c +++ b/apps/plugins/xrick/system/sysfile_rockbox.c @@ -64,7 +64,7 @@ void sysfile_clearRootPath() */ file_t sysfile_open(const char *name) { - int fd; + long fd; size_t fullPathLength = rb->strlen(rootPath) + rb->strlen(name) + 2; char *fullPath = sysmem_push(fullPathLength); @@ -97,7 +97,7 @@ file_t sysfile_open(const char *name) */ int sysfile_read(file_t file, void *buf, size_t size, size_t count) { - int fd = (int)file; + long fd = (long)file; return (rb->read(fd, buf, size * count) / size); } @@ -106,7 +106,7 @@ int sysfile_read(file_t file, void *buf, size_t size, size_t count) */ int sysfile_seek(file_t file, long offset, int origin) { - int fd = (int)file; + long fd = (long)file; return rb->lseek(fd, offset, origin); } @@ -115,7 +115,7 @@ int sysfile_seek(file_t file, long offset, int origin) */ void sysfile_close(file_t file) { - int fd = (int)file; + long fd = (long)file; rb->close(fd); } diff --git a/apps/plugins/xrick/system/sysvid_rockbox.c b/apps/plugins/xrick/system/sysvid_rockbox.c index 236bc87616..fccf515575 100644 --- a/apps/plugins/xrick/system/sysvid_rockbox.c +++ b/apps/plugins/xrick/system/sysvid_rockbox.c @@ -55,7 +55,9 @@ enum { GREYBUFSIZE = (LCD_WIDTH*((LCD_HEIGHT+7)/8)*16+200) }; # endif #endif /* ndef HAVE_LCD_COLOR */ +#ifdef HAVE_LCD_COLOR static fb_data *lcd_fb = NULL; +#endif #if (LCD_HEIGHT < SYSVID_HEIGHT) enum { ROW_RESIZE_STEP = (LCD_HEIGHT << 16) / SYSVID_HEIGHT }; -- cgit v1.2.3