summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/battery_bench.c2
-rw-r--r--apps/plugins/doom/d_deh.c16
-rw-r--r--apps/plugins/iriver_flash.c4
-rw-r--r--apps/plugins/jpeg.c2
-rw-r--r--apps/plugins/midi/synth.c2
-rw-r--r--apps/plugins/mp3_encoder.c4
-rw-r--r--apps/plugins/rockbox_flash.c2
-rw-r--r--apps/plugins/rockboy/menu.c8
-rw-r--r--apps/plugins/rockpaint.c2
-rw-r--r--apps/plugins/search.c2
-rw-r--r--apps/plugins/test_disk.c10
-rw-r--r--apps/plugins/text_editor.c2
-rw-r--r--apps/plugins/video.c4
-rw-r--r--apps/plugins/wav2wv.c2
14 files changed, 31 insertions, 31 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index a4da7f4bb5..53dd5be4c0 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -459,7 +459,7 @@ int main(void)
#endif
"\n"
,BATTERY_LOG,rb->global_settings->battery_capacity,
- BUF_SIZE / sizeof(struct batt_info));
+ BUF_SIZE / (unsigned)sizeof(struct batt_info));
rb->close(fd);
}
else
diff --git a/apps/plugins/doom/d_deh.c b/apps/plugins/doom/d_deh.c
index a5aee07848..c1e136f467 100644
--- a/apps/plugins/doom/d_deh.c
+++ b/apps/plugins/doom/d_deh.c
@@ -1918,25 +1918,25 @@ void deh_procFrame(DEHFILE *fpin, int fpout, char *line)
}
if (!strcasecmp(key,deh_state[0])) // Sprite number
{
- if (fpout) fdprintf(fpout," - sprite = %d\n",value);
+ if (fpout) fdprintf(fpout," - sprite = %ld\n",(long)value);
states[indexnum].sprite = (spritenum_t)value;
}
else
if (!strcasecmp(key,deh_state[1])) // Sprite subnumber
{
- if (fpout) fdprintf(fpout," - frame = %d\n",value);
+ if (fpout) fdprintf(fpout," - frame = %ld\n",(long)value);
states[indexnum].frame = (long)value; // long
}
else
if (!strcasecmp(key,deh_state[2])) // Duration
{
- if (fpout) fdprintf(fpout," - tics = %d\n",value);
+ if (fpout) fdprintf(fpout," - tics = %ld\n",(long)value);
states[indexnum].tics = (long)value; // long
}
else
if (!strcasecmp(key,deh_state[3])) // Next frame
{
- if (fpout) fdprintf(fpout," - nextstate = %d\n",value);
+ if (fpout) fdprintf(fpout," - nextstate = %ld\n",(long)value);
states[indexnum].nextstate = (statenum_t)value;
}
else
@@ -1948,13 +1948,13 @@ void deh_procFrame(DEHFILE *fpin, int fpout, char *line)
else
if (!strcasecmp(key,deh_state[5])) // Unknown 1
{
- if (fpout) fdprintf(fpout," - misc1 = %d\n",value);
+ if (fpout) fdprintf(fpout," - misc1 = %ld\n",(long)value);
states[indexnum].misc1 = (long)value; // long
}
else
if (!strcasecmp(key,deh_state[6])) // Unknown 2
{
- if (fpout) fdprintf(fpout," - misc2 = %d\n",value);
+ if (fpout) fdprintf(fpout," - misc2 = %ld\n",(long)value);
states[indexnum].misc2 = (long)value; // long
}
else
@@ -2017,8 +2017,8 @@ void deh_procPointer(DEHFILE *fpin, int fpout, char *line) // done
if (!strcasecmp(key,deh_state[4])) // Codep frame (not set in Frame deh block)
{
states[indexnum].action = deh_codeptr[value];
- if (fpout) fdprintf(fpout," - applied from codeptr[%d] to states[%d]\n",
- value,indexnum);
+ if (fpout) fdprintf(fpout," - applied from codeptr[%ld] to states[%d]\n",
+ (long)value,indexnum);
// Write BEX-oriented line to match:
for (i=0;i<NUMSTATES;i++)
{
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c
index 3d2ae7dcd5..4a6002f3df 100644
--- a/apps/plugins/iriver_flash.c
+++ b/apps/plugins/iriver_flash.c
@@ -418,10 +418,10 @@ int flash_rockbox(const char *filename, int section)
if (section == SECT_ROMIMAGE)
{
uint32_t *p32 = (uint32_t *)audiobuf;
-
+
if (pos+sizeof(struct flash_header) != *p32)
{
- rb->snprintf(buf, sizeof(buf), "Incorrect relocation: 0x%08x/0x%08x",
+ rb->snprintf(buf, sizeof(buf), "Incorrect relocation: 0x%08lx/0x%08lx",
*p32, pos+sizeof(struct flash_header));
rb->splash(HZ*10, buf);
return -1;
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c
index 900e6df72a..dbe7270d18 100644
--- a/apps/plugins/jpeg.c
+++ b/apps/plugins/jpeg.c
@@ -2565,7 +2565,7 @@ struct t_disp* get_image(struct jpeg* p_jpg, int ds)
if(!running_slideshow)
{
- rb->snprintf(print, sizeof(print), " %d.%02d sec ", time/HZ, time%HZ);
+ rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
rb->lcd_putsxy((LCD_WIDTH - w)/2, LCD_HEIGHT - h, print);
rb->lcd_update();
diff --git a/apps/plugins/midi/synth.c b/apps/plugins/midi/synth.c
index 78aaab18f4..a3a3d608e7 100644
--- a/apps/plugins/midi/synth.c
+++ b/apps/plugins/midi/synth.c
@@ -124,7 +124,7 @@ int initSynth(struct MIDIfile * mf, char * filename, char * drumConfig)
/* Scan our config file and load the right patches as needed */
int c = 0;
- rb->snprintf(name, 40, "");
+ name[0] = '\0';
printf("\nLoading instruments");
for(a=0; a<128; a++)
{
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c
index 8f4b9bdda6..5f852c43f4 100644
--- a/apps/plugins/mp3_encoder.c
+++ b/apps/plugins/mp3_encoder.c
@@ -2466,10 +2466,10 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
}
rb->lcd_clear_display();
- rb->snprintf(stg, 30, " Conversion: %d.%02ds ", tim/100, tim%100);
+ rb->snprintf(stg, 30, " Conversion: %ld.%02lds ", tim/100, tim%100);
rb->lcd_putsxy(0, 30, stg);
tim = frames * SAMP_PER_FRAME * 100 / 44100; /* unit=.01s */
- rb->snprintf(stg, 30, " WAV-Length: %d.%02ds ", tim/100, tim%100);
+ rb->snprintf(stg, 30, " WAV-Length: %ld.%02lds ", tim/100, tim%100);
rb->lcd_putsxy(0, 20, stg);
rb->lcd_update();
rb->sleep(5*HZ);
diff --git a/apps/plugins/rockbox_flash.c b/apps/plugins/rockbox_flash.c
index fbdfdbd7ee..deccb47bb9 100644
--- a/apps/plugins/rockbox_flash.c
+++ b/apps/plugins/rockbox_flash.c
@@ -693,7 +693,7 @@ void DoUserDialog(char* filename)
crc = CheckBootloader();
if (crc) /* outdated version found */
{
- rb->snprintf(buf, sizeof(buf), "(check=0x%08x)", crc);
+ rb->snprintf(buf, sizeof(buf), "(check=0x%08lx)", crc);
rb->lcd_puts(0, 0, buf);
rb->lcd_puts(0, 1, "Hint: You're not ");
rb->lcd_puts(0, 2, "using the latest ");
diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c
index abacd2c831..a3d64d60d0 100644
--- a/apps/plugins/rockboy/menu.c
+++ b/apps/plugins/rockboy/menu.c
@@ -167,7 +167,7 @@ static void build_slot_path(char *buf, size_t bufsiz, size_t slot_id) {
munge_name(name_buf, strlen(name_buf));
/* glom the whole mess together */
- snprintf(buf, bufsiz, "%s/%s-%d.rbs", STATE_DIR, name_buf, slot_id + 1);
+ snprintf(buf, bufsiz, "%s/%s-%ld.rbs", STATE_DIR, name_buf, slot_id + 1);
}
/*
@@ -263,17 +263,17 @@ static void slot_info(char *info_buf, size_t info_bufsiz, size_t slot_id) {
if (read(fd, buf, 20) > 0)
{
buf[20] = '\0';
- snprintf(info_buf, info_bufsiz, "%d. %s", slot_id + 1, buf);
+ snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, buf);
}
else
- snprintf(info_buf, info_bufsiz, "%d. ERROR", slot_id + 1);
+ snprintf(info_buf, info_bufsiz, "%ld. ERROR", slot_id + 1);
close(fd);
}
else
{
/* if we couldn't open the file, then the slot is empty */
- snprintf(info_buf, info_bufsiz, "%d. %s", slot_id + 1, "<Empty>");
+ snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, "<Empty>");
}
}
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c
index 34d9847042..68a3e5f595 100644
--- a/apps/plugins/rockpaint.c
+++ b/apps/plugins/rockpaint.c
@@ -2958,7 +2958,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
}
else
{
- rb->splash( 1*HZ, "Image loaded (%s)", parameter );
+ rb->splash( 1*HZ, "Image loaded (%s)", (char *)parameter );
restore_screen();
rb->strcpy( filename, parameter );
}
diff --git a/apps/plugins/search.c b/apps/plugins/search.c
index 6d4cfd2d78..26669f2b83 100644
--- a/apps/plugins/search.c
+++ b/apps/plugins/search.c
@@ -168,7 +168,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if(p)
*p = 0;
- rb->snprintf(resultfile, MAX_PATH, "%s/search_result.m3u", path, p+1);
+ rb->snprintf(resultfile, MAX_PATH, "%s/search_result.m3u", path);
ok = search_init(parameter);
if (!ok) {
return PLUGIN_ERROR;
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c
index 91fc3bb405..e302a621cb 100644
--- a/apps/plugins/test_disk.c
+++ b/apps/plugins/test_disk.c
@@ -207,7 +207,7 @@ static bool test_speed(void)
goto error;
}
time = *rb->current_tick - time;
- rb->snprintf(text_buf, sizeof text_buf, "Create: %d KByte/s",
+ rb->snprintf(text_buf, sizeof text_buf, "Create: %ld KByte/s",
(25 * buf_len / time) >> 8);
log_lcd(text_buf, true);
rb->close(fd);
@@ -226,7 +226,7 @@ static bool test_speed(void)
goto error;
}
time = *rb->current_tick - time;
- rb->snprintf(text_buf, sizeof text_buf, "Write A: %d KByte/s",
+ rb->snprintf(text_buf, sizeof text_buf, "Write A: %ld KByte/s",
(25 * buf_len / time) >> 8);
log_lcd(text_buf, true);
rb->close(fd);
@@ -245,7 +245,7 @@ static bool test_speed(void)
goto error;
}
time = *rb->current_tick - time;
- rb->snprintf(text_buf, sizeof text_buf, "Write U: %d KByte/s",
+ rb->snprintf(text_buf, sizeof text_buf, "Write U: %ld KByte/s",
(25 * buf_len / time) >> 8);
log_lcd(text_buf, true);
rb->close(fd);
@@ -264,7 +264,7 @@ static bool test_speed(void)
goto error;
}
time = *rb->current_tick - time;
- rb->snprintf(text_buf, sizeof text_buf, "Read A: %d KByte/s",
+ rb->snprintf(text_buf, sizeof text_buf, "Read A: %ld KByte/s",
(25 * buf_len / time) >> 8);
log_lcd(text_buf, true);
rb->close(fd);
@@ -283,7 +283,7 @@ static bool test_speed(void)
goto error;
}
time = *rb->current_tick - time;
- rb->snprintf(text_buf, sizeof text_buf, "Read U: %d KByte/s",
+ rb->snprintf(text_buf, sizeof text_buf, "Read U: %ld KByte/s",
(25 * buf_len / time) >> 8);
log_lcd(text_buf, true);
rb->close(fd);
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c
index 8040d00f22..9917d03242 100644
--- a/apps/plugins/text_editor.c
+++ b/apps/plugins/text_editor.c
@@ -123,7 +123,7 @@ char *list_get_name_cb(int selected_item,void* data,char* buf)
{
char t = b[MAX_PATH-10];
b[MAX_PATH-10] = '\0';
- rb->snprintf(buf,MAX_PATH,"%s ...\0",b);
+ rb->snprintf(buf,MAX_PATH,"%s ...",b);
b[MAX_PATH-10] = t;
}
else rb->strcpy(buf,b);
diff --git a/apps/plugins/video.c b/apps/plugins/video.c
index c2f64bbfa6..3700c233fe 100644
--- a/apps/plugins/video.c
+++ b/apps/plugins/video.c
@@ -962,9 +962,9 @@ int main(char* filename)
rb->lcd_puts(0, 2, gPrint);
rb->snprintf(gPrint, sizeof(gPrint), "%d MinVideo bytes", gStats.minVideoAvail);
rb->lcd_puts(0, 3, gPrint);
- rb->snprintf(gPrint, sizeof(gPrint), "MinSpinup %d.%02d", gStats.minSpinup/HZ, gStats.minSpinup%HZ);
+ rb->snprintf(gPrint, sizeof(gPrint), "MinSpinup %ld.%02ld", gStats.minSpinup/HZ, gStats.minSpinup%HZ);
rb->lcd_puts(0, 4, gPrint);
- rb->snprintf(gPrint, sizeof(gPrint), "MaxSpinup %d.%02d", gStats.maxSpinup/HZ, gStats.maxSpinup%HZ);
+ rb->snprintf(gPrint, sizeof(gPrint), "MaxSpinup %ld.%02ld", gStats.maxSpinup/HZ, gStats.maxSpinup%HZ);
rb->lcd_puts(0, 5, gPrint);
rb->snprintf(gPrint, sizeof(gPrint), "LowWater: %d", gBuf.low_water);
rb->lcd_puts(0, 6, gPrint);
diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c
index 07b1d225f8..69ccfa52a5 100644
--- a/apps/plugins/wav2wv.c
+++ b/apps/plugins/wav2wv.c
@@ -80,7 +80,7 @@ static void wvupdate (int32_t start_tick,
compression = (int)(((int64_t)(bytes_read - bytes_written) * 100 +
(bytes_read/2)) / bytes_read);
- rb->snprintf(buf, 32, "elapsed time: %d secs", (elapsed_ticks + (HZ/2)) / HZ);
+ rb->snprintf(buf, 32, "elapsed time: %ld secs", (elapsed_ticks + (HZ/2)) / HZ);
rb->lcd_puts(0, 2, (unsigned char *)buf);
rb->snprintf(buf, 32, "progress: %d%%", progress);