summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-01-31 08:11:45 +0100
committerHarald Welte <laforge@gnumonks.org>2012-02-07 20:03:02 +0100
commit0cb791a125bcd1b152bdede5f82d6906031c30e8 (patch)
tree5d4adc021483c37095a1b089a01684d448852e24
parent565840008b8c12a58466b4da1545d6e42670a610 (diff)
firmware/framebuffer: Cleanups of compiler warnings and debugging output
-rw-r--r--src/target/firmware/fb/fb_bw8.c6
-rw-r--r--src/target/firmware/fb/fb_dummy.c3
-rw-r--r--src/target/firmware/fb/fb_rgb332.c4
-rw-r--r--src/target/firmware/fb/fb_st7558.c1
4 files changed, 7 insertions, 7 deletions
diff --git a/src/target/firmware/fb/fb_bw8.c b/src/target/firmware/fb/fb_bw8.c
index 7a8323d..ffb59d8 100644
--- a/src/target/firmware/fb/fb_bw8.c
+++ b/src/target/firmware/fb/fb_bw8.c
@@ -104,7 +104,6 @@ static void set_pixel(uint8_t *and_mask,
int bitnum,
uint32_t color
){
- uint16_t v;
if(color == FB_COLOR_TRANSP)
return;
if(color == FB_COLOR_WHITE)
@@ -180,7 +179,6 @@ fb_bw8_putstr(char *str,int maxwidth){
const struct fb_char *fchr;
int x1,y1,x2,y2; // will become bounding box
- int dy; // char_y = screen_y + dy
int w; // 0..7 while building bits per byte
int y; // coordinates in display
int char_x,char_y; // coordinates in font character
@@ -196,7 +194,7 @@ fb_bw8_putstr(char *str,int maxwidth){
if (maxwidth < 0) {
total_w = 0;
/* count width of string */
- for(p=str;*p;p++){
+ for(p=(uint8_t *)str;*p;p++){
fchr = fb_font_get_char(font,*p);
if(!fchr) /* FIXME: Does '?' exist in every font? */
fchr = fb_font_get_char(font,'?');
@@ -217,7 +215,9 @@ fb_bw8_putstr(char *str,int maxwidth){
y1 = framebuffer->cursor_y - font->ascent + 1; // first row
y2 = y1 + font->height - 1; // last row
+#if 0
printf("%s: %d %d %d %d\n",__FUNCTION__,x1,y1,x2,y2);
+#endif
if(y1 < 0) // sanitize in case of overflow
y1 = 0;
diff --git a/src/target/firmware/fb/fb_dummy.c b/src/target/firmware/fb/fb_dummy.c
index f0ff24d..cb053de 100644
--- a/src/target/firmware/fb/fb_dummy.c
+++ b/src/target/firmware/fb/fb_dummy.c
@@ -24,6 +24,7 @@
*/
#include <fb/framebuffer.h>
+#include <defines.h>
static void
fb_dummy_init(){
@@ -46,7 +47,7 @@ fb_dummy_lineto(uint16_t x,uint16_t y){
}
static int
-fb_dummy_putstr(char *c,int maxwidth){
+fb_dummy_putstr(__unused char *c, __unused int maxwidth){
return 0;
}
diff --git a/src/target/firmware/fb/fb_rgb332.c b/src/target/firmware/fb/fb_rgb332.c
index 72ed87b..08d64e1 100644
--- a/src/target/firmware/fb/fb_rgb332.c
+++ b/src/target/firmware/fb/fb_rgb332.c
@@ -200,7 +200,7 @@ int fb_rgb332_putstr(char *str,int maxwidth){
int x1,y1,x2,y2; // will become bounding box
int y; // coordinates in display
- int char_x,char_y; // coordinates in font character
+ int char_x=0,char_y; // coordinates in font character
int bitmap_x,bitmap_y; // coordinates in character's bitmap
int byte_per_line; // depending on character width in font
int bitmap_offs,bitmap_bit; // offset inside bitmap, bit number of pixel
@@ -211,7 +211,7 @@ int fb_rgb332_putstr(char *str,int maxwidth){
if (maxwidth < 0) {
total_w = 0;
/* count width of string */
- for(p=str;*p;p++){
+ for(p=(uint8_t *)str;*p;p++){
fchr = fb_font_get_char(font,*p);
if(!fchr) /* FIXME: Does '?' exist in every font? */
fchr = fb_font_get_char(font,'?');
diff --git a/src/target/firmware/fb/fb_st7558.c b/src/target/firmware/fb/fb_st7558.c
index f3318b1..fdcd38f 100644
--- a/src/target/firmware/fb/fb_st7558.c
+++ b/src/target/firmware/fb/fb_st7558.c
@@ -80,7 +80,6 @@ fb_st7558_flush(){
int page,chunksize,nbytes;
uint8_t *p;
uint8_t cmd[2];
- int i;
if(fb_bw8->damage_y1 == fb_bw8->damage_y2 ||
fb_bw8->damage_x1 == fb_bw8->damage_x2)