diff options
Diffstat (limited to 'apps')
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); | |||
63 | extern unsigned char codecbuf[]; | 63 | extern unsigned char codecbuf[]; |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | extern void* plugin_get_audio_buffer(int *buffer_size); | 66 | extern void* plugin_get_audio_buffer(size_t *buffer_size); |
67 | 67 | ||
68 | struct codec_api ci_voice; | 68 | struct codec_api ci_voice; |
69 | 69 | ||
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 { | |||
272 | int (*kbd_input)(char* buffer, int buflen); | 272 | int (*kbd_input)(char* buffer, int buflen); |
273 | struct tm* (*get_time)(void); | 273 | struct tm* (*get_time)(void); |
274 | int (*set_time)(const struct tm *tm); | 274 | int (*set_time)(const struct tm *tm); |
275 | void* (*plugin_get_audio_buffer)(int* buffer_size); | 275 | void* (*plugin_get_audio_buffer)(size_t* buffer_size); |
276 | int (*round_value_to_list32)(unsigned long value, | 276 | int (*round_value_to_list32)(unsigned long value, |
277 | const unsigned long list[], | 277 | const unsigned long list[], |
278 | int count, | 278 | 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) | |||
312 | 312 | ||
313 | bool display_cuesheet_content(char* filename) | 313 | bool display_cuesheet_content(char* filename) |
314 | { | 314 | { |
315 | unsigned int bufsize = 0; | 315 | size_t bufsize = 0; |
316 | struct cuesheet *cue = (struct cuesheet *)plugin_get_buffer(&bufsize); | 316 | struct cuesheet *cue = (struct cuesheet *)plugin_get_buffer(&bufsize); |
317 | if (!cue || bufsize < sizeof(struct cuesheet)) | 317 | if (!cue || bufsize < sizeof(struct cuesheet)) |
318 | return false; | 318 | 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, | |||
947 | return false; | 947 | return false; |
948 | 948 | ||
949 | /* get buffer space from the plugin buffer */ | 949 | /* get buffer space from the plugin buffer */ |
950 | unsigned int buffersize = 0; | 950 | size_t buffersize = 0; |
951 | char *wps_buffer = (char *)plugin_get_buffer(&buffersize); | 951 | char *wps_buffer = (char *)plugin_get_buffer(&buffersize); |
952 | 952 | ||
953 | if (!wps_buffer) | 953 | 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) | |||
597 | /* Paste a file to a new directory. Will overwrite always. */ | 597 | /* Paste a file to a new directory. Will overwrite always. */ |
598 | static bool clipboard_pastefile(const char *src, const char *target, bool copy) | 598 | static bool clipboard_pastefile(const char *src, const char *target, bool copy) |
599 | { | 599 | { |
600 | int src_fd, target_fd, buffersize, size, bytesread, byteswritten; | 600 | int src_fd, target_fd; |
601 | ssize_t buffersize, size, bytesread, byteswritten; | ||
601 | char *buffer; | 602 | char *buffer; |
602 | bool result = false; | 603 | bool result = false; |
603 | 604 | ||
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, | |||
276 | char* filename, bool reload) | 276 | char* filename, bool reload) |
277 | { | 277 | { |
278 | char* buffer; | 278 | char* buffer; |
279 | int buffer_size; | 279 | ssize_t buffer_size; |
280 | bool is_playing = audio_status() & AUDIO_STATUS_PLAY; | 280 | bool is_playing = audio_status() & AUDIO_STATUS_PLAY; |
281 | 281 | ||
282 | if (!filename && !is_playing) | 282 | if (!filename && !is_playing) |
@@ -294,7 +294,7 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer, | |||
294 | /* Viewing playlist on disk */ | 294 | /* Viewing playlist on disk */ |
295 | char *dir, *file, *temp_ptr; | 295 | char *dir, *file, *temp_ptr; |
296 | char *index_buffer = NULL; | 296 | char *index_buffer = NULL; |
297 | int index_buffer_size = 0; | 297 | ssize_t index_buffer_size = 0; |
298 | 298 | ||
299 | viewer->playlist = &temp_playlist; | 299 | viewer->playlist = &temp_playlist; |
300 | 300 | ||
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) | |||
667 | 667 | ||
668 | /* Returns a pointer to the portion of the plugin buffer that is not already | 668 | /* Returns a pointer to the portion of the plugin buffer that is not already |
669 | being used. If no plugin is loaded, returns the entire plugin buffer */ | 669 | being used. If no plugin is loaded, returns the entire plugin buffer */ |
670 | void* plugin_get_buffer(int* buffer_size) | 670 | void* plugin_get_buffer(size_t *buffer_size) |
671 | { | 671 | { |
672 | int buffer_pos; | 672 | int buffer_pos; |
673 | 673 | ||
@@ -692,10 +692,10 @@ void* plugin_get_buffer(int* buffer_size) | |||
692 | Playback gets stopped, to avoid conflicts. | 692 | Playback gets stopped, to avoid conflicts. |
693 | Talk buffer is stolen as well. | 693 | Talk buffer is stolen as well. |
694 | */ | 694 | */ |
695 | void* plugin_get_audio_buffer(int* buffer_size) | 695 | void* plugin_get_audio_buffer(size_t *buffer_size) |
696 | { | 696 | { |
697 | #if CONFIG_CODEC == SWCODEC | 697 | #if CONFIG_CODEC == SWCODEC |
698 | return audio_get_buffer(true, (size_t *)buffer_size); | 698 | return audio_get_buffer(true, buffer_size); |
699 | #else | 699 | #else |
700 | audio_stop(); | 700 | audio_stop(); |
701 | talk_buffer_steal(); /* we use the mp3 buffer, need to tell */ | 701 | 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 { | |||
545 | int (*kbd_input)(char* buffer, int buflen); | 545 | int (*kbd_input)(char* buffer, int buflen); |
546 | struct tm* (*get_time)(void); | 546 | struct tm* (*get_time)(void); |
547 | int (*set_time)(const struct tm *tm); | 547 | int (*set_time)(const struct tm *tm); |
548 | void* (*plugin_get_buffer)(int* buffer_size); | 548 | void* (*plugin_get_buffer)(size_t *buffer_size); |
549 | void* (*plugin_get_audio_buffer)(int* buffer_size); | 549 | void* (*plugin_get_audio_buffer)(size_t *buffer_size); |
550 | void (*plugin_tsr)(bool (*exit_callback)(bool reenter)); | 550 | void (*plugin_tsr)(bool (*exit_callback)(bool reenter)); |
551 | #ifdef IRAM_STEAL | 551 | #ifdef IRAM_STEAL |
552 | void (*plugin_iram_init)(char *iramstart, char *iramcopy, size_t iram_size, | 552 | void (*plugin_iram_init)(char *iramstart, char *iramcopy, size_t iram_size, |
@@ -653,8 +653,8 @@ extern unsigned char plugin_end_addr[]; | |||
653 | #endif /* PLUGIN */ | 653 | #endif /* PLUGIN */ |
654 | 654 | ||
655 | int plugin_load(const char* plugin, void* parameter); | 655 | int plugin_load(const char* plugin, void* parameter); |
656 | void* plugin_get_buffer(int *buffer_size); | 656 | void* plugin_get_buffer(size_t *buffer_size); |
657 | void* plugin_get_audio_buffer(int *buffer_size); | 657 | void* plugin_get_audio_buffer(size_t *buffer_size); |
658 | #ifdef IRAM_STEAL | 658 | #ifdef IRAM_STEAL |
659 | void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size, | 659 | void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size, |
660 | char *iedata, size_t iedata_size); | 660 | 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) | |||
1143 | #ifdef DEBUG | 1143 | #ifdef DEBUG |
1144 | int button; | 1144 | int button; |
1145 | #endif | 1145 | #endif |
1146 | int stacksize; | 1146 | ssize_t stacksize; |
1147 | void* stack; | 1147 | void* stack; |
1148 | 1148 | ||
1149 | mbus_init(); /* init the M-Bus layer */ | 1149 | 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) | |||
552 | int t_disp = 0; | 552 | int t_disp = 0; |
553 | #ifdef USE_GSLIB | 553 | #ifdef USE_GSLIB |
554 | unsigned char *gbuf; | 554 | unsigned char *gbuf; |
555 | unsigned int gbuf_size = 0; | 555 | size_t gbuf_size = 0; |
556 | bool mode_switch = true; | 556 | bool mode_switch = true; |
557 | #endif | 557 | #endif |
558 | 558 | ||
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) | |||
62 | 62 | ||
63 | /* global vars for pl_malloc() */ | 63 | /* global vars for pl_malloc() */ |
64 | void *bufptr; | 64 | void *bufptr; |
65 | int bufleft; | 65 | ssize_t bufleft; |
66 | 66 | ||
67 | /* simple function to "allocate" memory in pluginbuffer. */ | 67 | /* simple function to "allocate" memory in pluginbuffer. */ |
68 | void *pl_malloc(int size) | 68 | void *pl_malloc(ssize_t size) |
69 | { | 69 | { |
70 | void *ptr; | 70 | void *ptr; |
71 | ptr = bufptr; | 71 | 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) | |||
231 | 231 | ||
232 | void Z_Init(void) | 232 | void Z_Init(void) |
233 | { | 233 | { |
234 | unsigned int size; | 234 | size_t size; |
235 | #ifdef INSTRUMENTED | 235 | #ifdef INSTRUMENTED |
236 | if (!(HEADER_SIZE >= sizeof(memblock_t) && MIN_RAM > LEAVE_ASIDE)) | 236 | if (!(HEADER_SIZE >= sizeof(memblock_t) && MIN_RAM > LEAVE_ASIDE)) |
237 | I_Error("Z_Init: Sanity check failed"); | 237 | 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]; | |||
37 | 37 | ||
38 | #ifndef HAVE_LCD_COLOR | 38 | #ifndef HAVE_LCD_COLOR |
39 | static unsigned char *gbuf; | 39 | static unsigned char *gbuf; |
40 | static unsigned int gbuf_size = 0; | 40 | static size_t gbuf_size = 0; |
41 | static unsigned char draw_buffer[8*LCD_WIDTH]; | 41 | static unsigned char draw_buffer[8*LCD_WIDTH]; |
42 | #endif | 42 | #endif |
43 | 43 | ||
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) | |||
880 | char default_filename[32]; | 880 | char default_filename[32]; |
881 | int button; | 881 | int button; |
882 | int rc; /* generic return code */ | 882 | int rc; /* generic return code */ |
883 | int memleft; | 883 | ssize_t memleft; |
884 | tCheckROM result; | 884 | tCheckROM result; |
885 | bool is_romless; | 885 | bool is_romless; |
886 | 886 | ||
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 | |||
75 | static struct plugin_api* rb; /* global api struct pointer */ | 75 | static struct plugin_api* rb; /* global api struct pointer */ |
76 | static char pbuf[32]; /* global printf buffer */ | 76 | static char pbuf[32]; /* global printf buffer */ |
77 | static unsigned char *gbuf; | 77 | static unsigned char *gbuf; |
78 | static unsigned int gbuf_size = 0; | 78 | static size_t gbuf_size = 0; |
79 | 79 | ||
80 | /**************************** main function ********************************/ | 80 | /**************************** main function ********************************/ |
81 | 81 | ||
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 @@ | |||
25 | #ifndef SIMULATOR /* only for target */ | 25 | #ifndef SIMULATOR /* only for target */ |
26 | 26 | ||
27 | unsigned char *audiobuf; | 27 | unsigned char *audiobuf; |
28 | int audiobuf_size; | 28 | ssize_t audiobuf_size; |
29 | 29 | ||
30 | #if defined(IRIVER_H120) | 30 | #if defined(IRIVER_H120) |
31 | #define PLATFORM_ID ID_IRIVER_H100 | 31 | #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 | |||
27 | 27 | ||
28 | static struct plugin_api* rb; | 28 | static struct plugin_api* rb; |
29 | 29 | ||
30 | int buf_size; | 30 | ssize_t buf_size; |
31 | static char *filename; | 31 | static char *filename; |
32 | static int readsize; | 32 | static int readsize; |
33 | static char *stringbuffer; | 33 | 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) */ | |||
1874 | /* the remaining free part of the buffer for compressed+uncompressed images */ | 1874 | /* the remaining free part of the buffer for compressed+uncompressed images */ |
1875 | unsigned char* buf_images; | 1875 | unsigned char* buf_images; |
1876 | 1876 | ||
1877 | int buf_size, buf_images_size; | 1877 | ssize_t buf_size, buf_images_size; |
1878 | /* the root of the images, hereafter are decompresed ones */ | 1878 | /* the root of the images, hereafter are decompresed ones */ |
1879 | unsigned char* buf_root; | 1879 | unsigned char* buf_root; |
1880 | int root_size; | 1880 | 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, | |||
47 | unsigned char *filename, unsigned char *name) | 47 | unsigned char *filename, unsigned char *name) |
48 | { | 48 | { |
49 | int fd, readsize; | 49 | int fd, readsize; |
50 | int audiobuf_size; | 50 | ssize_t audiobuf_size; |
51 | unsigned char *audiobuf; | 51 | unsigned char *audiobuf; |
52 | static struct plugin_header header; | 52 | static struct plugin_header header; |
53 | 53 | ||
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; | |||
179 | 179 | ||
180 | #ifdef USEGSLIB | 180 | #ifdef USEGSLIB |
181 | static unsigned char *gbuf; | 181 | static unsigned char *gbuf; |
182 | static unsigned int gbuf_size = 0; | 182 | static size_t gbuf_size = 0; |
183 | static unsigned char imgbuffer[LCD_HEIGHT]; | 183 | static unsigned char imgbuffer[LCD_HEIGHT]; |
184 | #else | 184 | #else |
185 | static fb_data imgbuffer[LCD_HEIGHT]; | 185 | 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); | |||
146 | void *alloc(int size) | 146 | void *alloc(int size) |
147 | { | 147 | { |
148 | static char *offset = NULL; | 148 | static char *offset = NULL; |
149 | static int totalSize = 0; | 149 | static ssize_t totalSize = 0; |
150 | char *ret; | 150 | char *ret; |
151 | 151 | ||
152 | int remainder = size % 4; | 152 | int remainder = size % 4; |
@@ -186,7 +186,7 @@ void *alloc(int size) | |||
186 | void *alloc(int size) | 186 | void *alloc(int size) |
187 | { | 187 | { |
188 | static char *offset = NULL; | 188 | static char *offset = NULL; |
189 | static int totalSize = 0; | 189 | static ssize_t totalSize = 0; |
190 | char *ret; | 190 | char *ret; |
191 | 191 | ||
192 | 192 | ||
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) | |||
1607 | { | 1607 | { |
1608 | int status = PLUGIN_ERROR; /* assume failure */ | 1608 | int status = PLUGIN_ERROR; /* assume failure */ |
1609 | void* audiobuf; | 1609 | void* audiobuf; |
1610 | int audiosize; | 1610 | ssize_t audiosize; |
1611 | int in_file; | 1611 | int in_file; |
1612 | uint8_t* buffer; | 1612 | uint8_t* buffer; |
1613 | size_t file_remaining; | 1613 | size_t file_remaining; |
@@ -1652,7 +1652,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
1652 | buffer_size = audiosize - (PCMBUFFER_SIZE+PCMBUFFER_GUARD_SIZE+ | 1652 | buffer_size = audiosize - (PCMBUFFER_SIZE+PCMBUFFER_GUARD_SIZE+ |
1653 | MPABUF_SIZE+LIBMPEG2BUFFER_SIZE); | 1653 | MPABUF_SIZE+LIBMPEG2BUFFER_SIZE); |
1654 | 1654 | ||
1655 | DEBUGF("audiosize=%d, buffer_size=%ld\n",audiosize,buffer_size); | 1655 | DEBUGF("audiosize=%ld, buffer_size=%ld\n",audiosize,buffer_size); |
1656 | buffer = mpeg2_malloc(buffer_size,-1); | 1656 | buffer = mpeg2_malloc(buffer_size,-1); |
1657 | 1657 | ||
1658 | if (buffer == NULL) | 1658 | 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; | |||
45 | static unsigned char colours[256]; /* Smooth transition of shades */ | 45 | static unsigned char colours[256]; /* Smooth transition of shades */ |
46 | static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */ | 46 | static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */ |
47 | static unsigned char *gbuf; | 47 | static unsigned char *gbuf; |
48 | static unsigned int gbuf_size = 0; | 48 | static size_t gbuf_size = 0; |
49 | #endif | 49 | #endif |
50 | static unsigned char sp1, sp2, sp3, sp4; /* Speed of plasma */ | 50 | static unsigned char sp1, sp2, sp3, sp4; /* Speed of plasma */ |
51 | static int plasma_frequency; | 51 | 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; | |||
27 | static int lasttick; | 27 | static int lasttick; |
28 | #define RFA_FILE ROCKBOX_DIR "/folder_advance_list.dat" | 28 | #define RFA_FILE ROCKBOX_DIR "/folder_advance_list.dat" |
29 | char *buffer = NULL; | 29 | char *buffer = NULL; |
30 | int buffer_size; | 30 | ssize_t buffer_size; |
31 | struct file_format { | 31 | struct file_format { |
32 | int count; | 32 | int count; |
33 | char folder[][MAX_PATH]; | 33 | 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) | |||
645 | int rc; /* generic return code */ | 645 | int rc; /* generic return code */ |
646 | UINT32 space, aligned_size, true_size; | 646 | UINT32 space, aligned_size, true_size; |
647 | UINT8* pos; | 647 | UINT8* pos; |
648 | int memleft; | 648 | ssize_t memleft; |
649 | UINT32 crc; | 649 | UINT32 crc; |
650 | bool show_greet = false; | 650 | bool show_greet = false; |
651 | 651 | ||
@@ -849,7 +849,7 @@ void DoUserDialog(char* filename) | |||
849 | int rc; /* generic return code */ | 849 | int rc; /* generic return code */ |
850 | UINT32 space, aligned_size, true_size; | 850 | UINT32 space, aligned_size, true_size; |
851 | UINT8* pos; | 851 | UINT8* pos; |
852 | int memleft; | 852 | ssize_t memleft; |
853 | UINT32 crc; | 853 | UINT32 crc; |
854 | 854 | ||
855 | /* this can only work if Rockbox runs in DRAM, not flash ROM */ | 855 | /* 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; | |||
44 | 44 | ||
45 | void *audio_bufferbase; | 45 | void *audio_bufferbase; |
46 | void *audio_bufferpointer; | 46 | void *audio_bufferpointer; |
47 | unsigned int audio_buffer_free; | 47 | size_t audio_buffer_free; |
48 | 48 | ||
49 | void *my_malloc(size_t size) | 49 | void *my_malloc(size_t size) |
50 | { | 50 | { |
@@ -194,13 +194,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
194 | if(rb->audio_status()) | 194 | if(rb->audio_status()) |
195 | { | 195 | { |
196 | audio_bufferbase = audio_bufferpointer | 196 | audio_bufferbase = audio_bufferpointer |
197 | = rb->plugin_get_buffer((int *)&audio_buffer_free); | 197 | = rb->plugin_get_buffer(&audio_buffer_free); |
198 | plugbuf=true; | 198 | plugbuf=true; |
199 | } | 199 | } |
200 | else | 200 | else |
201 | { | 201 | { |
202 | audio_bufferbase = audio_bufferpointer | 202 | audio_bufferbase = audio_bufferpointer |
203 | = rb->plugin_get_audio_buffer((int *)&audio_buffer_free); | 203 | = rb->plugin_get_audio_buffer(&audio_buffer_free); |
204 | plugbuf=false; | 204 | plugbuf=false; |
205 | } | 205 | } |
206 | #if MEM <= 8 && !defined(SIMULATOR) | 206 | #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 | |||
25 | 25 | ||
26 | void *audio_bufferbase; | 26 | void *audio_bufferbase; |
27 | void *audio_bufferpointer; | 27 | void *audio_bufferpointer; |
28 | unsigned int audio_buffer_free; | 28 | size_t audio_buffer_free; |
29 | struct plugin_api* rb; | 29 | struct plugin_api* rb; |
30 | int w, h, y; | 30 | int w, h, y; |
31 | 31 | ||
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) | |||
327 | { | 327 | { |
328 | int linecnt = 0; | 328 | int linecnt = 0; |
329 | int fd; | 329 | int fd; |
330 | int size; | 330 | ssize_t size; |
331 | char buf[64]; /* Larger than WIDTH, to allow for whitespace after the | 331 | char buf[64]; /* Larger than WIDTH, to allow for whitespace after the |
332 | lines */ | 332 | lines */ |
333 | 333 | ||
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 | |||
59 | 59 | ||
60 | static struct plugin_api* rb; | 60 | static struct plugin_api* rb; |
61 | 61 | ||
62 | int buf_size; | 62 | ssize_t buf_size; |
63 | static char *filename; | 63 | static char *filename; |
64 | static int num_entries; | 64 | static int num_entries; |
65 | static char **pointers; | 65 | 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( | |||
573 | unsigned char *buffer; | 573 | unsigned char *buffer; |
574 | unsigned int i = 0; | 574 | unsigned int i = 0; |
575 | ssize_t bytes_read = 1; /* ensure the for loop is executed */ | 575 | ssize_t bytes_read = 1; /* ensure the for loop is executed */ |
576 | unsigned int buffer_size; | 576 | size_t buffer_size; |
577 | buffer = rb->plugin_get_buffer(&buffer_size); | 577 | buffer = rb->plugin_get_buffer(&buffer_size); |
578 | 578 | ||
579 | for (i = 0; i < bytes && bytes_read > 0; i += bytes_read) | 579 | 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 | |||
32 | 32 | ||
33 | static struct plugin_api* rb; | 33 | static struct plugin_api* rb; |
34 | static unsigned char* audiobuf; | 34 | static unsigned char* audiobuf; |
35 | static int audiobufsize; | 35 | static ssize_t audiobufsize; |
36 | 36 | ||
37 | static unsigned short frnd_buffer; | 37 | static unsigned short frnd_buffer; |
38 | static int line = 0; | 38 | 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 | |||
22 | 22 | ||
23 | static struct plugin_api* rb; | 23 | static struct plugin_api* rb; |
24 | 24 | ||
25 | static char *audiobuf; | 25 | static char *audiobuf; |
26 | static int audiobuflen; | 26 | static ssize_t audiobuflen; |
27 | 27 | ||
28 | static void xingupdate(int percent) | 28 | static void xingupdate(int percent) |
29 | { | 29 | { |
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) { | |||
38 | } | 38 | } |
39 | 39 | ||
40 | static char *audiobuf; | 40 | static char *audiobuf; |
41 | static int audiobuflen; | 41 | static ssize_t audiobuflen; |
42 | 42 | ||
43 | static struct wav_header { | 43 | static struct wav_header { |
44 | char ckID [4]; /* RIFF chuck header */ | 44 | 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)); | |||
3138 | static struct plugin_api *rb; | 3138 | static struct plugin_api *rb; |
3139 | 3139 | ||
3140 | static unsigned char *aud_buf; | 3140 | static unsigned char *aud_buf; |
3141 | static int aud_size; | 3141 | static ssize_t aud_size; |
3142 | static unsigned char *plug_buf; | 3142 | static unsigned char *plug_buf; |
3143 | 3143 | ||
3144 | static void (*pcm_callback)(unsigned char**, int*) = NULL; | 3144 | static void (*pcm_callback)(unsigned char**, int*) = NULL; |
@@ -3649,7 +3649,7 @@ int play_file(char* filename) | |||
3649 | /* plugin entry point */ | 3649 | /* plugin entry point */ |
3650 | enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | 3650 | enum plugin_status plugin_start(struct plugin_api* api, void* parameter) |
3651 | { | 3651 | { |
3652 | int buf_size; | 3652 | ssize_t buf_size; |
3653 | 3653 | ||
3654 | rb = api; | 3654 | rb = api; |
3655 | 3655 | ||
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 | |||
60 | 60 | ||
61 | /* global vars */ | 61 | /* global vars */ |
62 | static char *audiobuf; | 62 | static char *audiobuf; |
63 | static int audiobuflen; | 63 | static ssize_t audiobuflen; |
64 | static uint32_t mempeakcount = 0; | 64 | static uint32_t mempeakcount = 0; |
65 | static uint32_t filepeakcount = 0; | 65 | static uint32_t filepeakcount = 0; |
66 | static uint32_t fppmp = 0; /* file peaks per mem peaks */ | 66 | 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){ | |||
19 | void *my_malloc(size_t size) | 19 | void *my_malloc(size_t size) |
20 | { | 20 | { |
21 | static char *offset = NULL; | 21 | static char *offset = NULL; |
22 | static int totalSize = 0; | 22 | static ssize_t totalSize = 0; |
23 | char *ret; | 23 | char *ret; |
24 | 24 | ||
25 | int remainder = size % 4; | 25 | 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; | |||
52 | 52 | ||
53 | #ifdef USE_GRAY | 53 | #ifdef USE_GRAY |
54 | static unsigned char *gbuf; | 54 | static unsigned char *gbuf; |
55 | static unsigned int gbuf_size = 0; | 55 | static size_t gbuf_size = 0; |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | long video_frames IBSS_ATTR = 0 ; | 58 | long video_frames IBSS_ATTR = 0 ; |