summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs.c2
-rw-r--r--apps/codecs.h2
-rw-r--r--apps/cuesheet.c2
-rw-r--r--apps/gui/wps_parser.c2
-rw-r--r--apps/onplay.c3
-rw-r--r--apps/playlist_viewer.c4
-rw-r--r--apps/plugin.c6
-rw-r--r--apps/plugin.h8
-rw-r--r--apps/plugins/alpine_cdc.c2
-rw-r--r--apps/plugins/cube.c2
-rw-r--r--apps/plugins/dict.c4
-rw-r--r--apps/plugins/doom/z_zone.c2
-rw-r--r--apps/plugins/fire.c2
-rw-r--r--apps/plugins/firmware_flash.c2
-rw-r--r--apps/plugins/grayscale.c2
-rw-r--r--apps/plugins/iriver_flash.c2
-rw-r--r--apps/plugins/iriverify.c2
-rw-r--r--apps/plugins/jpeg.c2
-rw-r--r--apps/plugins/lib/overlay.c2
-rw-r--r--apps/plugins/mandelbrot.c2
-rw-r--r--apps/plugins/midi/midiutil.c4
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c4
-rw-r--r--apps/plugins/plasma.c2
-rw-r--r--apps/plugins/random_folder_advance_config.c2
-rw-r--r--apps/plugins/rockbox_flash.c4
-rw-r--r--apps/plugins/rockboy/rockboy.c6
-rw-r--r--apps/plugins/searchengine/searchengine.c2
-rw-r--r--apps/plugins/snake2.c2
-rw-r--r--apps/plugins/sort.c2
-rw-r--r--apps/plugins/splitedit.c2
-rw-r--r--apps/plugins/test_disk.c2
-rw-r--r--apps/plugins/vbrfix.c4
-rw-r--r--apps/plugins/wav2wv.c2
-rw-r--r--apps/plugins/wavplay.c4
-rw-r--r--apps/plugins/wavview.c2
-rw-r--r--apps/plugins/zxbox/helpers.c2
-rw-r--r--apps/plugins/zxbox/zxbox.c2
37 files changed, 52 insertions, 51 deletions
diff --git a/apps/codecs.c b/apps/codecs.c
index 1de83588c1..f5eb5db8c2 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -63,7 +63,7 @@ void sim_codec_close(void *pd);
extern unsigned char codecbuf[];
#endif
-extern void* plugin_get_audio_buffer(int *buffer_size);
+extern void* plugin_get_audio_buffer(size_t *buffer_size);
struct codec_api ci_voice;
diff --git a/apps/codecs.h b/apps/codecs.h
index 5dfadcc29d..8f7d556302 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -272,7 +272,7 @@ struct codec_api {
int (*kbd_input)(char* buffer, int buflen);
struct tm* (*get_time)(void);
int (*set_time)(const struct tm *tm);
- void* (*plugin_get_audio_buffer)(int* buffer_size);
+ void* (*plugin_get_audio_buffer)(size_t* buffer_size);
int (*round_value_to_list32)(unsigned long value,
const unsigned long list[],
int count,
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index 0d96eafe0c..970959b5d2 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -312,7 +312,7 @@ static void browse_cuesheet(struct cuesheet *cue)
bool display_cuesheet_content(char* filename)
{
- unsigned int bufsize = 0;
+ size_t bufsize = 0;
struct cuesheet *cue = (struct cuesheet *)plugin_get_buffer(&bufsize);
if (!cue || bufsize < sizeof(struct cuesheet))
return false;
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index 0617ed2c1a..5f1149968f 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -947,7 +947,7 @@ bool wps_data_load(struct wps_data *wps_data,
return false;
/* get buffer space from the plugin buffer */
- unsigned int buffersize = 0;
+ size_t buffersize = 0;
char *wps_buffer = (char *)plugin_get_buffer(&buffersize);
if (!wps_buffer)
diff --git a/apps/onplay.c b/apps/onplay.c
index 6aaa6e734f..2912fc3fe0 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -597,7 +597,8 @@ static bool clipboard_copy(void)
/* Paste a file to a new directory. Will overwrite always. */
static bool clipboard_pastefile(const char *src, const char *target, bool copy)
{
- int src_fd, target_fd, buffersize, size, bytesread, byteswritten;
+ int src_fd, target_fd;
+ ssize_t buffersize, size, bytesread, byteswritten;
char *buffer;
bool result = false;
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index eaca81e190..78ec23105c 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -276,7 +276,7 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer,
char* filename, bool reload)
{
char* buffer;
- int buffer_size;
+ ssize_t buffer_size;
bool is_playing = audio_status() & AUDIO_STATUS_PLAY;
if (!filename && !is_playing)
@@ -294,7 +294,7 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer,
/* Viewing playlist on disk */
char *dir, *file, *temp_ptr;
char *index_buffer = NULL;
- int index_buffer_size = 0;
+ ssize_t index_buffer_size = 0;
viewer->playlist = &temp_playlist;
diff --git a/apps/plugin.c b/apps/plugin.c
index a059a8d035..0ce214cbde 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -667,7 +667,7 @@ int plugin_load(const char* plugin, void* parameter)
/* Returns a pointer to the portion of the plugin buffer that is not already
being used. If no plugin is loaded, returns the entire plugin buffer */
-void* plugin_get_buffer(int* buffer_size)
+void* plugin_get_buffer(size_t *buffer_size)
{
int buffer_pos;
@@ -692,10 +692,10 @@ void* plugin_get_buffer(int* buffer_size)
Playback gets stopped, to avoid conflicts.
Talk buffer is stolen as well.
*/
-void* plugin_get_audio_buffer(int* buffer_size)
+void* plugin_get_audio_buffer(size_t *buffer_size)
{
#if CONFIG_CODEC == SWCODEC
- return audio_get_buffer(true, (size_t *)buffer_size);
+ return audio_get_buffer(true, buffer_size);
#else
audio_stop();
talk_buffer_steal(); /* we use the mp3 buffer, need to tell */
diff --git a/apps/plugin.h b/apps/plugin.h
index f118260154..2886b0938f 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -545,8 +545,8 @@ struct plugin_api {
int (*kbd_input)(char* buffer, int buflen);
struct tm* (*get_time)(void);
int (*set_time)(const struct tm *tm);
- void* (*plugin_get_buffer)(int* buffer_size);
- void* (*plugin_get_audio_buffer)(int* buffer_size);
+ void* (*plugin_get_buffer)(size_t *buffer_size);
+ void* (*plugin_get_audio_buffer)(size_t *buffer_size);
void (*plugin_tsr)(bool (*exit_callback)(bool reenter));
#ifdef IRAM_STEAL
void (*plugin_iram_init)(char *iramstart, char *iramcopy, size_t iram_size,
@@ -653,8 +653,8 @@ extern unsigned char plugin_end_addr[];
#endif /* PLUGIN */
int plugin_load(const char* plugin, void* parameter);
-void* plugin_get_buffer(int *buffer_size);
-void* plugin_get_audio_buffer(int *buffer_size);
+void* plugin_get_buffer(size_t *buffer_size);
+void* plugin_get_audio_buffer(size_t *buffer_size);
#ifdef IRAM_STEAL
void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size,
char *iedata, size_t iedata_size);
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c
index c235900a8c..08689d661f 100644
--- a/apps/plugins/alpine_cdc.c
+++ b/apps/plugins/alpine_cdc.c
@@ -1143,7 +1143,7 @@ int main(void* parameter)
#ifdef DEBUG
int button;
#endif
- int stacksize;
+ ssize_t stacksize;
void* stack;
mbus_init(); /* init the M-Bus layer */
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index f481ee3ff4..bb9e89e2c1 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -552,7 +552,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
int t_disp = 0;
#ifdef USE_GSLIB
unsigned char *gbuf;
- unsigned int gbuf_size = 0;
+ size_t gbuf_size = 0;
bool mode_switch = true;
#endif
diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c
index 1ec9bce948..4c12fa7506 100644
--- a/apps/plugins/dict.c
+++ b/apps/plugins/dict.c
@@ -62,10 +62,10 @@ void init_screen(void)
/* global vars for pl_malloc() */
void *bufptr;
-int bufleft;
+ssize_t bufleft;
/* simple function to "allocate" memory in pluginbuffer. */
-void *pl_malloc(int size)
+void *pl_malloc(ssize_t size)
{
void *ptr;
ptr = bufptr;
diff --git a/apps/plugins/doom/z_zone.c b/apps/plugins/doom/z_zone.c
index 552e3218b0..1d0ac5b7c8 100644
--- a/apps/plugins/doom/z_zone.c
+++ b/apps/plugins/doom/z_zone.c
@@ -231,7 +231,7 @@ void Z_Close(void)
void Z_Init(void)
{
- unsigned int size;
+ size_t size;
#ifdef INSTRUMENTED
if (!(HEADER_SIZE >= sizeof(memblock_t) && MIN_RAM > LEAVE_ASIDE))
I_Error("Z_Init: Sanity check failed");
diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c
index 4917bf6a63..915e9ae1dc 100644
--- a/apps/plugins/fire.c
+++ b/apps/plugins/fire.c
@@ -37,7 +37,7 @@ static unsigned char cooling_map[LCD_HEIGHT][LCD_WIDTH];
#ifndef HAVE_LCD_COLOR
static unsigned char *gbuf;
-static unsigned int gbuf_size = 0;
+static size_t gbuf_size = 0;
static unsigned char draw_buffer[8*LCD_WIDTH];
#endif
diff --git a/apps/plugins/firmware_flash.c b/apps/plugins/firmware_flash.c
index a0fac4258e..c1cd3b2fe9 100644
--- a/apps/plugins/firmware_flash.c
+++ b/apps/plugins/firmware_flash.c
@@ -880,7 +880,7 @@ void DoUserDialog(char* filename)
char default_filename[32];
int button;
int rc; /* generic return code */
- int memleft;
+ ssize_t memleft;
tCheckROM result;
bool is_romless;
diff --git a/apps/plugins/grayscale.c b/apps/plugins/grayscale.c
index 61231af39b..6d3a83e1e9 100644
--- a/apps/plugins/grayscale.c
+++ b/apps/plugins/grayscale.c
@@ -75,7 +75,7 @@ PLUGIN_HEADER
static struct plugin_api* rb; /* global api struct pointer */
static char pbuf[32]; /* global printf buffer */
static unsigned char *gbuf;
-static unsigned int gbuf_size = 0;
+static size_t gbuf_size = 0;
/**************************** main function ********************************/
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c
index 4a6002f3df..ea89f4270a 100644
--- a/apps/plugins/iriver_flash.c
+++ b/apps/plugins/iriver_flash.c
@@ -25,7 +25,7 @@
#ifndef SIMULATOR /* only for target */
unsigned char *audiobuf;
-int audiobuf_size;
+ssize_t audiobuf_size;
#if defined(IRIVER_H120)
#define PLATFORM_ID ID_IRIVER_H100
diff --git a/apps/plugins/iriverify.c b/apps/plugins/iriverify.c
index 91d890e457..69c52f5480 100644
--- a/apps/plugins/iriverify.c
+++ b/apps/plugins/iriverify.c
@@ -27,7 +27,7 @@ PLUGIN_HEADER
static struct plugin_api* rb;
-int buf_size;
+ssize_t buf_size;
static char *filename;
static int readsize;
static char *stringbuffer;
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c
index 038abdf259..b52b3bf2ce 100644
--- a/apps/plugins/jpeg.c
+++ b/apps/plugins/jpeg.c
@@ -1874,7 +1874,7 @@ unsigned char* buf; /* up to here currently used by image(s) */
/* the remaining free part of the buffer for compressed+uncompressed images */
unsigned char* buf_images;
-int buf_size, buf_images_size;
+ssize_t buf_size, buf_images_size;
/* the root of the images, hereafter are decompresed ones */
unsigned char* buf_root;
int root_size;
diff --git a/apps/plugins/lib/overlay.c b/apps/plugins/lib/overlay.c
index edae36671f..7c2b899634 100644
--- a/apps/plugins/lib/overlay.c
+++ b/apps/plugins/lib/overlay.c
@@ -47,7 +47,7 @@ enum plugin_status run_overlay(struct plugin_api* rb, void* parameter,
unsigned char *filename, unsigned char *name)
{
int fd, readsize;
- int audiobuf_size;
+ ssize_t audiobuf_size;
unsigned char *audiobuf;
static struct plugin_header header;
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c
index 824fc03c87..2c538fb37a 100644
--- a/apps/plugins/mandelbrot.c
+++ b/apps/plugins/mandelbrot.c
@@ -179,7 +179,7 @@ static unsigned max_iter;
#ifdef USEGSLIB
static unsigned char *gbuf;
-static unsigned int gbuf_size = 0;
+static size_t gbuf_size = 0;
static unsigned char imgbuffer[LCD_HEIGHT];
#else
static fb_data imgbuffer[LCD_HEIGHT];
diff --git a/apps/plugins/midi/midiutil.c b/apps/plugins/midi/midiutil.c
index 5149104c14..9d114c9f39 100644
--- a/apps/plugins/midi/midiutil.c
+++ b/apps/plugins/midi/midiutil.c
@@ -146,7 +146,7 @@ int midimain(void * filename);
void *alloc(int size)
{
static char *offset = NULL;
- static int totalSize = 0;
+ static ssize_t totalSize = 0;
char *ret;
int remainder = size % 4;
@@ -186,7 +186,7 @@ void *alloc(int size)
void *alloc(int size)
{
static char *offset = NULL;
- static int totalSize = 0;
+ static ssize_t totalSize = 0;
char *ret;
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index d4a5c06da6..6b3ee92c4e 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -1607,7 +1607,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
{
int status = PLUGIN_ERROR; /* assume failure */
void* audiobuf;
- int audiosize;
+ ssize_t audiosize;
int in_file;
uint8_t* buffer;
size_t file_remaining;
@@ -1652,7 +1652,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
buffer_size = audiosize - (PCMBUFFER_SIZE+PCMBUFFER_GUARD_SIZE+
MPABUF_SIZE+LIBMPEG2BUFFER_SIZE);
- DEBUGF("audiosize=%d, buffer_size=%ld\n",audiosize,buffer_size);
+ DEBUGF("audiosize=%ld, buffer_size=%ld\n",audiosize,buffer_size);
buffer = mpeg2_malloc(buffer_size,-1);
if (buffer == NULL)
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c
index d5decd1e2e..09249d996a 100644
--- a/apps/plugins/plasma.c
+++ b/apps/plugins/plasma.c
@@ -45,7 +45,7 @@ static int redphase = 0, greenphase = 50, bluephase = 100;
static unsigned char colours[256]; /* Smooth transition of shades */
static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */
static unsigned char *gbuf;
-static unsigned int gbuf_size = 0;
+static size_t gbuf_size = 0;
#endif
static unsigned char sp1, sp2, sp3, sp4; /* Speed of plasma */
static int plasma_frequency;
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c
index e300675cdf..2afaf4d56e 100644
--- a/apps/plugins/random_folder_advance_config.c
+++ b/apps/plugins/random_folder_advance_config.c
@@ -27,7 +27,7 @@ static int dirs_count;
static int lasttick;
#define RFA_FILE ROCKBOX_DIR "/folder_advance_list.dat"
char *buffer = NULL;
-int buffer_size;
+ssize_t buffer_size;
struct file_format {
int count;
char folder[][MAX_PATH];
diff --git a/apps/plugins/rockbox_flash.c b/apps/plugins/rockbox_flash.c
index 8edfd017cc..86e62eb433 100644
--- a/apps/plugins/rockbox_flash.c
+++ b/apps/plugins/rockbox_flash.c
@@ -645,7 +645,7 @@ void DoUserDialog(char* filename)
int rc; /* generic return code */
UINT32 space, aligned_size, true_size;
UINT8* pos;
- int memleft;
+ ssize_t memleft;
UINT32 crc;
bool show_greet = false;
@@ -849,7 +849,7 @@ void DoUserDialog(char* filename)
int rc; /* generic return code */
UINT32 space, aligned_size, true_size;
UINT8* pos;
- int memleft;
+ ssize_t memleft;
UINT32 crc;
/* this can only work if Rockbox runs in DRAM, not flash ROM */
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index 3fbe1fd8e1..cefa0e4f9e 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -44,7 +44,7 @@ struct options options;
void *audio_bufferbase;
void *audio_bufferpointer;
-unsigned int audio_buffer_free;
+size_t audio_buffer_free;
void *my_malloc(size_t size)
{
@@ -194,13 +194,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if(rb->audio_status())
{
audio_bufferbase = audio_bufferpointer
- = rb->plugin_get_buffer((int *)&audio_buffer_free);
+ = rb->plugin_get_buffer(&audio_buffer_free);
plugbuf=true;
}
else
{
audio_bufferbase = audio_bufferpointer
- = rb->plugin_get_audio_buffer((int *)&audio_buffer_free);
+ = rb->plugin_get_audio_buffer(&audio_buffer_free);
plugbuf=false;
}
#if MEM <= 8 && !defined(SIMULATOR)
diff --git a/apps/plugins/searchengine/searchengine.c b/apps/plugins/searchengine/searchengine.c
index 2687bd9289..62d3a91fa7 100644
--- a/apps/plugins/searchengine/searchengine.c
+++ b/apps/plugins/searchengine/searchengine.c
@@ -25,7 +25,7 @@ PLUGIN_HEADER
void *audio_bufferbase;
void *audio_bufferpointer;
-unsigned int audio_buffer_free;
+size_t audio_buffer_free;
struct plugin_api* rb;
int w, h, y;
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index cd4037ae70..54a88b409c 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -327,7 +327,7 @@ int load_all_levels(void)
{
int linecnt = 0;
int fd;
- int size;
+ ssize_t size;
char buf[64]; /* Larger than WIDTH, to allow for whitespace after the
lines */
diff --git a/apps/plugins/sort.c b/apps/plugins/sort.c
index 79b5400db2..3d348c1178 100644
--- a/apps/plugins/sort.c
+++ b/apps/plugins/sort.c
@@ -59,7 +59,7 @@ PLUGIN_HEADER
static struct plugin_api* rb;
-int buf_size;
+ssize_t buf_size;
static char *filename;
static int num_entries;
static char **pointers;
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c
index a44087e609..7dd6be0408 100644
--- a/apps/plugins/splitedit.c
+++ b/apps/plugins/splitedit.c
@@ -573,7 +573,7 @@ static int copy_file(
unsigned char *buffer;
unsigned int i = 0;
ssize_t bytes_read = 1; /* ensure the for loop is executed */
- unsigned int buffer_size;
+ size_t buffer_size;
buffer = rb->plugin_get_buffer(&buffer_size);
for (i = 0; i < bytes && bytes_read > 0; i += bytes_read)
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c
index e302a621cb..44cee39dd2 100644
--- a/apps/plugins/test_disk.c
+++ b/apps/plugins/test_disk.c
@@ -32,7 +32,7 @@ PLUGIN_HEADER
static struct plugin_api* rb;
static unsigned char* audiobuf;
-static int audiobufsize;
+static ssize_t audiobufsize;
static unsigned short frnd_buffer;
static int line = 0;
diff --git a/apps/plugins/vbrfix.c b/apps/plugins/vbrfix.c
index 73409eb568..e3b74cbc0f 100644
--- a/apps/plugins/vbrfix.c
+++ b/apps/plugins/vbrfix.c
@@ -22,8 +22,8 @@ PLUGIN_HEADER
static struct plugin_api* rb;
-static char *audiobuf;
-static int audiobuflen;
+static char *audiobuf;
+static ssize_t audiobuflen;
static void xingupdate(int percent)
{
diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c
index 34f0317726..a889bb848c 100644
--- a/apps/plugins/wav2wv.c
+++ b/apps/plugins/wav2wv.c
@@ -38,7 +38,7 @@ void *memcpy(void *dest, const void *src, size_t n) {
}
static char *audiobuf;
-static int audiobuflen;
+static ssize_t audiobuflen;
static struct wav_header {
char ckID [4]; /* RIFF chuck header */
diff --git a/apps/plugins/wavplay.c b/apps/plugins/wavplay.c
index faa5b0861a..e814ccb79c 100644
--- a/apps/plugins/wavplay.c
+++ b/apps/plugins/wavplay.c
@@ -3138,7 +3138,7 @@ void dma_end_isr(void) __attribute__((interrupt_handler));
static struct plugin_api *rb;
static unsigned char *aud_buf;
-static int aud_size;
+static ssize_t aud_size;
static unsigned char *plug_buf;
static void (*pcm_callback)(unsigned char**, int*) = NULL;
@@ -3649,7 +3649,7 @@ int play_file(char* filename)
/* plugin entry point */
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
{
- int buf_size;
+ ssize_t buf_size;
rb = api;
diff --git a/apps/plugins/wavview.c b/apps/plugins/wavview.c
index b56a379a43..f399e052a4 100644
--- a/apps/plugins/wavview.c
+++ b/apps/plugins/wavview.c
@@ -60,7 +60,7 @@ struct peakstruct
/* global vars */
static char *audiobuf;
-static int audiobuflen;
+static ssize_t audiobuflen;
static uint32_t mempeakcount = 0;
static uint32_t filepeakcount = 0;
static uint32_t fppmp = 0; /* file peaks per mem peaks */
diff --git a/apps/plugins/zxbox/helpers.c b/apps/plugins/zxbox/helpers.c
index c176c007a4..d6b25a2452 100644
--- a/apps/plugins/zxbox/helpers.c
+++ b/apps/plugins/zxbox/helpers.c
@@ -19,7 +19,7 @@ int my_putc(char c , int fd){
void *my_malloc(size_t size)
{
static char *offset = NULL;
- static int totalSize = 0;
+ static ssize_t totalSize = 0;
char *ret;
int remainder = size % 4;
diff --git a/apps/plugins/zxbox/zxbox.c b/apps/plugins/zxbox/zxbox.c
index b85dc01991..1faec08e69 100644
--- a/apps/plugins/zxbox/zxbox.c
+++ b/apps/plugins/zxbox/zxbox.c
@@ -52,7 +52,7 @@ static int previous_state;
#ifdef USE_GRAY
static unsigned char *gbuf;
-static unsigned int gbuf_size = 0;
+static size_t gbuf_size = 0;
#endif
long video_frames IBSS_ATTR = 0 ;