summaryrefslogtreecommitdiffstats
path: root/apps/gui
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-12-05 22:44:42 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-12-05 22:44:42 +0000
commitf981ea93fb411019133a022c7dd873166d66b5dd (patch)
tree4f671d67b6584068d4e388c5fd4b6cdd54b5cca2 /apps/gui
parent5c3546ccbb14b576fd5eef3815bdfc97047de422 (diff)
downloadrockbox-f981ea93fb411019133a022c7dd873166d66b5dd.tar.gz
rockbox-f981ea93fb411019133a022c7dd873166d66b5dd.zip
kill gcc4 warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8162 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/gwps-common.c44
-rw-r--r--apps/gui/splash.c4
-rw-r--r--apps/gui/splash.h2
-rw-r--r--apps/gui/textarea.c5
-rw-r--r--apps/gui/yesno.c4
5 files changed, 35 insertions, 24 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index afc00a4519..665f6f4bb0 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -1130,7 +1130,7 @@ void gui_wps_format(struct wps_data *data, const char *bmpdir,
/* load the image */
ret = read_bmp_file(imgname, &data->img[n].w,
- &data->img[n].h, img_buf_ptr,
+ &data->img[n].h, (char *)img_buf_ptr,
img_buf_free);
if (ret > 0)
{
@@ -1389,10 +1389,11 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
#endif
#ifdef HAVE_LCD_BITMAP
/* calculate different string sizes and positions */
- display->getstringsize(" ", &space_width, &string_height);
+ display->getstringsize((unsigned char *)" ", &space_width, &string_height);
if (data->format_align[i][data->curr_subline[i]].left != 0) {
- display->getstringsize(data->format_align[i][data->curr_subline[i]].left,
- &left_width, &string_height);
+ display->getstringsize((unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].left,
+ &left_width, &string_height);
}
else {
left_width = 0;
@@ -1400,8 +1401,9 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
left_xpos = 0;
if (data->format_align[i][data->curr_subline[i]].center != 0) {
- display->getstringsize(data->format_align[i][data->curr_subline[i]].center,
- &center_width, &string_height);
+ display->getstringsize((unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].center,
+ &center_width, &string_height);
}
else {
center_width = 0;
@@ -1409,8 +1411,9 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
center_xpos=(display->width - center_width) / 2;
if (data->format_align[i][data->curr_subline[i]].right != 0) {
- display->getstringsize(data->format_align[i][data->curr_subline[i]].right,
- &right_width, &string_height);
+ display->getstringsize((unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].right,
+ &right_width, &string_height);
}
else {
right_width = 0;
@@ -1517,7 +1520,8 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
if (left_width>display->width) {
display->puts_scroll(0, i,
- data->format_align[i][data->curr_subline[i]].left);
+ (unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].left);
} else {
/* clear the line first */
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
@@ -1526,23 +1530,26 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
/* Nasty hack: we output an empty scrolling string,
which will reset the scroller for that line */
- display->puts_scroll(0, i, "");
+ display->puts_scroll(0, i, (unsigned char *)"");
/* print aligned strings */
if (left_width != 0)
{
display->putsxy(left_xpos, ypos,
- data->format_align[i][data->curr_subline[i]].left);
+ (unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].left);
}
if (center_width != 0)
{
display->putsxy(center_xpos, ypos,
- data->format_align[i][data->curr_subline[i]].center);
+ (unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].center);
}
if (right_width != 0)
{
display->putsxy(right_xpos, ypos,
- data->format_align[i][data->curr_subline[i]].right);
+ (unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].right);
}
}
#else
@@ -1568,23 +1575,26 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset,
/* Nasty hack: we output an empty scrolling string,
which will reset the scroller for that line */
- display->puts_scroll(0, i, "");
+ display->puts_scroll(0, i, (unsigned char *)"");
/* print aligned strings */
if (left_width != 0)
{
display->putsxy(left_xpos, ypos,
- data->format_align[i][data->curr_subline[i]].left);
+ (unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].left);
}
if (center_width != 0)
{
display->putsxy(center_xpos, ypos,
- data->format_align[i][data->curr_subline[i]].center);
+ (unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].center);
}
if (right_width != 0)
{
display->putsxy(right_xpos, ypos,
- data->format_align[i][data->curr_subline[i]].right);
+ (unsigned char *)data->format_align[i]
+ [data->curr_subline[i]].right);
}
#else
update_line = true;
diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index 551888544f..fffa520b4f 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -186,7 +186,7 @@ static void splash(struct screen * screen,
}
void gui_splash(struct screen * screen, int ticks,
- bool center, const char *fmt, ...)
+ bool center, const unsigned char *fmt, ...)
{
va_list ap;
va_start( ap, fmt );
@@ -197,7 +197,7 @@ void gui_splash(struct screen * screen, int ticks,
sleep(ticks);
}
-void gui_syncsplash(int ticks, bool center, const char *fmt, ...)
+void gui_syncsplash(int ticks, bool center, const unsigned char *fmt, ...)
{
va_list ap;
int i;
diff --git a/apps/gui/splash.h b/apps/gui/splash.h
index b1aece9dde..9d8def16f8 100644
--- a/apps/gui/splash.h
+++ b/apps/gui/splash.h
@@ -39,6 +39,6 @@ extern void gui_splash(struct screen * screen, int ticks,
* - fmt : what to say *printf style
*/
extern void gui_syncsplash(int ticks, bool center,
- const char *fmt, ...);
+ const unsigned char *fmt, ...);
#endif /* _GUI_ICON_H_ */
diff --git a/apps/gui/textarea.c b/apps/gui/textarea.c
index 1ddb70eadf..54aa7e4a6c 100644
--- a/apps/gui/textarea.c
+++ b/apps/gui/textarea.c
@@ -49,7 +49,7 @@ int gui_textarea_put_message(struct screen * display,
int i;
gui_textarea_clear(display);
for(i=0;i<message->nb_lines && i+ystart<display->nb_lines;i++)
- display->puts_scroll(0, i+ystart, message->message_lines[i]);
+ display->puts_scroll(0, i+ystart, (unsigned char *)message->message_lines[i]);
gui_textarea_update(display);
return(i);
}
@@ -64,7 +64,8 @@ void gui_textarea_update_nblines(struct screen * display)
if(global_settings.buttonbar && display->has_buttonbar)
height -= BUTTONBAR_HEIGHT;
#endif
- display->getstringsize("A", &display->char_width, &display->char_height);
+ display->getstringsize((unsigned char *)"A", &display->char_width,
+ &display->char_height);
display->nb_lines = height / display->char_height;
#else
display->char_width = 1;
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c
index 220f1814dc..3345a691ca 100644
--- a/apps/gui/yesno.c
+++ b/apps/gui/yesno.c
@@ -55,8 +55,8 @@ bool gui_yesno_draw_result(struct gui_yesno * yn, enum yesno_res result)
}
enum yesno_res gui_syncyesno_run(struct text_message * main_message,
- struct text_message * yes_message,
- struct text_message * no_message)
+ struct text_message * yes_message,
+ struct text_message * no_message)
{
int i;
unsigned button;