Initial gcc4 warning cleanup (and some minor policing)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8063 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2005-11-25 00:10:12 +00:00
parent 8790056691
commit 1a29cfb23e
8 changed files with 29 additions and 29 deletions

View File

@ -38,7 +38,7 @@
bool bidi_support_enabled = false;
unsigned char *bidi_l2v(const unsigned char *str, int orientation)
unsigned char *bidi_l2v(const char *str, int orientation)
{
static unsigned char buf_heb_str[_HEB_BUFFER_LENGTH];
static unsigned char buf_broken_str[_HEB_BUFFER_LENGTH];
@ -50,9 +50,9 @@ unsigned char *bidi_l2v(const unsigned char *str, int orientation)
int begin, end, char_count, orig_begin;
if (!str || !*str)
return "";
return (unsigned char *)"";
tmp = str;
tmp = (unsigned char *)str;
block_start=block_end=0;
block_ended=0;

View File

@ -95,8 +95,8 @@ _DEFUN (memcmp, (m1, m2, n),
/* check m mod LBLOCKSIZE remaining characters */
s1 = (char*)a1;
s2 = (char*)a2;
s1 = (unsigned char*)a1;
s2 = (unsigned char*)a2;
}
while (n--)

View File

@ -95,7 +95,7 @@ _DEFUN (memcpy, (dst0, src0, len0),
*aligned_dst++ = *aligned_src++;
*aligned_dst++ = *aligned_src++;
*aligned_dst++ = *aligned_src++;
len -= BIGBLOCKSIZE;
len -= (unsigned int)BIGBLOCKSIZE;
}
/* Copy one long word at a time if possible. */

View File

@ -181,7 +181,7 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
va_list ap;
struct for_snprintf pr;
pr.ptr = buf;
pr.ptr = (unsigned char *)buf;
pr.bytes = 0;
pr.max = size;
@ -200,7 +200,7 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list ap)
bool ok;
struct for_snprintf pr;
pr.ptr = buf;
pr.ptr = (unsigned char *)buf;
pr.bytes = 0;
pr.max = size;

View File

@ -1153,7 +1153,7 @@ void lcd_remote_puts_style(int x, int y, const unsigned char *str, int style)
return;
lcd_remote_getstringsize(str, &w, &h);
xpos = xmargin + x*w / strlen(str);
xpos = xmargin + x*w / strlen((char *)str);
ypos = ymargin + y*h;
lcd_remote_putsxy(xpos, ypos, str);
drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID);
@ -1233,10 +1233,10 @@ void lcd_remote_puts_scroll_style(int x, int y, const unsigned char *string, int
char *end;
memset(s->line, 0, sizeof s->line);
strcpy(s->line, string);
strcpy(s->line, (char *)string);
/* get width */
s->width = lcd_remote_getstringsize(s->line, &w, &h);
s->width = lcd_remote_getstringsize((unsigned char *)s->line, &w, &h);
/* scroll bidirectional or forward only depending on the string
width */
@ -1250,13 +1250,13 @@ void lcd_remote_puts_scroll_style(int x, int y, const unsigned char *string, int
if (!s->bidir) { /* add spaces if scrolling in the round */
strcat(s->line, " ");
/* get new width incl. spaces */
s->width = lcd_remote_getstringsize(s->line, &w, &h);
s->width = lcd_remote_getstringsize((unsigned char *)s->line, &w, &h);
}
end = strchr(s->line, '\0');
strncpy(end, string, LCD_REMOTE_WIDTH/2);
strncpy(end, (char *)string, LCD_REMOTE_WIDTH/2);
s->len = strlen(string);
s->len = strlen((char *)string);
s->offset = 0;
s->startx = x;
s->backward = false;
@ -1332,7 +1332,7 @@ static void scroll_thread(void)
drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID);
lcd_remote_fillrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height);
drawmode = DRMODE_SOLID;
lcd_remote_putsxyofs(xpos, ypos, s->offset, s->line);
lcd_remote_putsxyofs(xpos, ypos, s->offset, (unsigned char *)s->line);
if (s->invert)
{
drawmode = DRMODE_COMPLEMENT;

View File

@ -1069,7 +1069,7 @@ void lcd_puts_style(int x, int y, const unsigned char *str, int style)
return;
lcd_getstringsize(str, &w, &h);
xpos = xmargin + x*w / strlen(str);
xpos = xmargin + x*w / strlen((char *)str);
ypos = ymargin + y*h;
lcd_putsxy(xpos, ypos, str);
drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID);
@ -1155,10 +1155,10 @@ void lcd_puts_scroll_style(int x, int y, const unsigned char *string, int style)
char *end;
memset(s->line, 0, sizeof s->line);
strcpy(s->line, string);
strcpy(s->line, (char *)string);
/* get width */
s->width = lcd_getstringsize(s->line, &w, &h);
s->width = lcd_getstringsize((unsigned char *)s->line, &w, &h);
/* scroll bidirectional or forward only depending on the string
width */
@ -1172,13 +1172,13 @@ void lcd_puts_scroll_style(int x, int y, const unsigned char *string, int style)
if (!s->bidir) { /* add spaces if scrolling in the round */
strcat(s->line, " ");
/* get new width incl. spaces */
s->width = lcd_getstringsize(s->line, &w, &h);
s->width = lcd_getstringsize((unsigned char *)s->line, &w, &h);
}
end = strchr(s->line, '\0');
strncpy(end, string, LCD_WIDTH/2);
strncpy(end, (char *)string, LCD_WIDTH/2);
s->len = strlen(string);
s->len = strlen((char *)string);
s->offset = 0;
s->startx = x;
s->backward = false;
@ -1245,7 +1245,7 @@ static void scroll_thread(void)
drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID);
lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
drawmode = DRMODE_SOLID;
lcd_putsxyofs(xpos, ypos, s->offset, s->line);
lcd_putsxyofs(xpos, ypos, s->offset, (unsigned char *)s->line);
if (s->invert)
{
drawmode = DRMODE_COMPLEMENT;

View File

@ -192,7 +192,7 @@ static int unsynchronize(char* tag, int len, bool *ff_found)
unsigned char c;
unsigned char *rp, *wp;
wp = rp = tag;
wp = rp = (unsigned char *)tag;
rp = (unsigned char *)tag;
for(i = 0;i < len;i++) {
@ -475,14 +475,14 @@ static bool setid3v1title(int fd, struct mp3entry *entry)
if (read(fd, buffer, sizeof buffer) != sizeof buffer)
return false;
if (strncmp(buffer, "TAG", 3))
if (strncmp((char *)buffer, "TAG", 3))
return false;
entry->id3v1len = 128;
entry->id3version = ID3_VER_1_0;
for (i=0; i < (int)sizeof offsets; i++) {
char* ptr = buffer + offsets[i];
char* ptr = (char *)buffer + offsets[i];
if (i<3) {
/* kill trailing space in strings */

View File

@ -57,19 +57,19 @@ void panicf( const char *fmt, ...)
#ifdef HAVE_LCD_CHARCELLS
lcd_double_height(false);
lcd_puts(0,0,"*PANIC*");
lcd_puts(0,1,panic_buf);
lcd_puts(0, 0, "*PANIC*");
lcd_puts(0, 1, panic_buf);
#elif defined(HAVE_LCD_BITMAP)
lcd_clear_display();
lcd_setfont(FONT_SYSFIXED);
lcd_puts(0,0,"*PANIC*");
lcd_puts(0, 0, (unsigned char *)"*PANIC*");
{
/* wrap panic line */
int i, y=1, len = strlen(panic_buf);
for (i=0; i<len; i+=18) {
unsigned char c = panic_buf[i+18];
panic_buf[i+18] = 0;
lcd_puts(0,y++,panic_buf+i);
lcd_puts(0, y++, (unsigned char *)panic_buf+i);
panic_buf[i+18] = c;
}
}