Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[compiler warnings] fixes for updated compiler in Ubuntu 11.10

New compiler is able detect unused variables, so remove these

Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information...
commit 549d2191a1efe7f2d4e4015fd91b88568df4937d 1 parent 6222dc9
@hxw hxw authored
View
5 host-tools/pcf2bmf/pcf.c
@@ -525,8 +525,6 @@ void Generate_new_font_with_header(pcffont_t *font, char *bmf_filename)
if (bmf_filename[0])
{
- int rc;
-
fd_bmf = fopen(bmf_filename, "rb");
if (NULL == fd_bmf)
{
@@ -543,7 +541,7 @@ void Generate_new_font_with_header(pcffont_t *font, char *bmf_filename)
printf("Fail to allocate buffer for base bmf font, size %d\n", base_font_size);
exit(-1);
}
- rc = fread(base_font_buf, base_font_size, 1, fd_bmf);
+ fread(base_font_buf, base_font_size, 1, fd_bmf);
fclose (fd_bmf);
}
strcpy(name,sOutFilename);
@@ -2300,4 +2298,3 @@ int wide_char_width(wchar_t ucs)
(ucs >= 0xffe0 && ucs <= 0xffe6) ||
(ucs >= 0x20000 && ucs <= 0x2ffff)));
}
-
View
8 wiki/bmf.c
@@ -27,7 +27,7 @@
int load_bmf(pcffont_bmf_t *font)
{
- int fd, read_size;
+ int fd;
font_bmf_header header;
if (NULL == font || NULL == font->file) {
@@ -51,7 +51,7 @@ int load_bmf(pcffont_bmf_t *font)
}
memset(font->charmetric, 0, font->file_size);
- read_size = file_read(fd, font->charmetric, 256 * sizeof(charmetric_bmf)+sizeof(font_bmf_header));
+ file_read(fd, font->charmetric, 256 * sizeof(charmetric_bmf)+sizeof(font_bmf_header));
memcpy(&header,font->charmetric,sizeof(font_bmf_header));
@@ -67,7 +67,7 @@ int
pres_bmfbm(ucs4_t val, pcffont_bmf_t *font, bmf_bm_t **bitmap,charmetric_bmf *Cmetrics)
{
int size = 0;
- int read_size = 0, offset = 0;
+ int offset = 0;
char buffer[1024];
int font_header;
int bFound = 0;
@@ -119,7 +119,7 @@ pres_bmfbm(ucs4_t val, pcffont_bmf_t *font, bmf_bm_t **bitmap,charmetric_bmf *Cm
{
size = sizeof(charmetric_bmf);
- read_size = file_read(font->fd,buffer,size);
+ file_read(font->fd,buffer,size);
memcpy(Cmetrics,buffer,sizeof(charmetric_bmf));
memcpy(font->charmetric+val*sizeof(charmetric_bmf)+font_header,Cmetrics,sizeof(charmetric_bmf));
}
View
4 wiki/keyboard.c
@@ -875,7 +875,7 @@ void draw_key_bubble(int start_x, int start_y, int end_x, int end_y, unsigned ch
(void)end_y; // *** unused argument
int i, j;
int bubble_start_x, bubble_start_y, bubble_end_x, bubble_end_y;
- int bubble_stem_start_x, bubble_stem_start_y, bubble_stem_end_x, bubble_stem_end_y;
+ int bubble_stem_start_x, bubble_stem_start_y, bubble_stem_end_x /*, bubble_stem_end_y*/;
int bubble_stem_left_diff, bubble_stem_right_diff;
unsigned char s[5];
int width;
@@ -904,7 +904,7 @@ void draw_key_bubble(int start_x, int start_y, int end_x, int end_y, unsigned ch
bubble_stem_start_x = bubble_start_x - bubble_adjust + (KEY_BUBBLE_TOTAL_WIDTH - bubble_stem_width) / 2;
bubble_stem_end_x = bubble_stem_start_x + bubble_stem_width - 1;
bubble_stem_start_y = bubble_end_y + 1;
- bubble_stem_end_y = bubble_start_y + KEY_BUBBLE_TOTAL_HEIGHT - 1;
+ //bubble_stem_end_y = bubble_start_y + KEY_BUBBLE_TOTAL_HEIGHT - 1;
bubble_stem_left_diff = bubble_stem_start_x - bubble_start_x - bubble_adjust;
bubble_stem_right_diff = bubble_end_x - bubble_stem_end_x + bubble_adjust;
View
12 wiki/lcd_buf_draw.c
@@ -1979,7 +1979,8 @@ void display_link_article(long idx_article)
void display_str(const unsigned char *str)
{
int start_x,end_x,start_y,end_y;
- int offset_x,offset_y;
+ int offset_x;
+ // int offset_y;
int str_width;
const unsigned char *p;
@@ -1999,7 +2000,7 @@ void display_str(const unsigned char *str)
str_width = get_external_str_pixel_width(p, DEFAULT_FONT_IDX);
offset_x = (end_x - str_width) / 2 - start_x;
- offset_y = 0;
+ //offset_y = 0;
buf_draw_UTF8_str_in_copy_buffer(framebuffer_copy,&str,start_x,end_x,start_y,end_y,offset_x,DEFAULT_FONT_IDX);
repaint_framebuffer(framebuffer_copy,-1, 0);
@@ -2165,14 +2166,17 @@ int is_lcd_buf_area_blank(int start_x, int start_y, int end_x, int end_y)
int nothing_before_link(int article_link_number)
{
- int start_x,start_y,end_x,end_y;
+ int start_x;
+ int start_y;
+ //int end_x;
+ int end_y;
start_y = (articleLink[article_link_number].start_xy >> 8);
start_x = (articleLink[article_link_number].start_xy & 0x000000ff) + LCD_LEFT_MARGIN - 1;
if (start_x < 0)
start_x = 0;
end_y = (articleLink[article_link_number].end_xy >>8);
- end_x = (articleLink[article_link_number].end_xy & 0x000000ff) + LCD_LEFT_MARGIN;
+ //end_x = (articleLink[article_link_number].end_xy & 0x000000ff) + LCD_LEFT_MARGIN;
if (is_lcd_buf_area_blank(0, start_y, start_x - 2, end_y))
return ARTICLE_LINK_NOTHING_BEFORE;
else
View
5 wiki/restricted.c
@@ -73,7 +73,6 @@ void first_time_password(int flag)
int i;
const unsigned char *pText;
unsigned char str[256];
- int width;
uint8_t *framebuffer = lcd_get_framebuffer();
guilib_fb_lock();
@@ -96,10 +95,10 @@ void first_time_password(int flag)
if (flag)
{
pText = get_nls_text("protection");
- width = extract_str_fitting_width(&pText, str, LCD_BUF_WIDTH_PIXELS - LCD_LEFT_MARGIN, SUBTITLE_FONT_IDX);
+ extract_str_fitting_width(&pText, str, LCD_BUF_WIDTH_PIXELS - LCD_LEFT_MARGIN, SUBTITLE_FONT_IDX);
if (ustrlen(str))
render_string(SUBTITLE_FONT_IDX, LCD_LEFT_MARGIN, BLACK_SPACE_START + 10, str, ustrlen(str), 1);
- width = extract_str_fitting_width(&pText, str, LCD_BUF_WIDTH_PIXELS - LCD_LEFT_MARGIN, SUBTITLE_FONT_IDX);
+ extract_str_fitting_width(&pText, str, LCD_BUF_WIDTH_PIXELS - LCD_LEFT_MARGIN, SUBTITLE_FONT_IDX);
if (ustrlen(str))
render_string(SUBTITLE_FONT_IDX, LCD_LEFT_MARGIN, BLACK_SPACE_START + 30, str, ustrlen(str), 1);
extract_str_fitting_width(&pText, str, LCD_BUF_WIDTH_PIXELS - LCD_LEFT_MARGIN, SUBTITLE_FONT_IDX);
View
4 wiki/search.c
@@ -697,7 +697,7 @@ long get_search_result_start()
long offset_search_result_start = -1;
int idx_prefix_index_table;
char c1, c2, c3;
- int found = 0;
+ //int found = 0;
long offset;
switch(search_str_len)
@@ -723,7 +723,7 @@ long get_search_result_start()
bigram_char_idx(c2) * SEARCH_CHR_COUNT + bigram_char_idx(c3);
if ((offset = get_prefix_index_table(idx_prefix_index_table)))
{
- found = 1;
+ //found = 1;
offset_search_result_start = offset;
}
if (search_interrupted)
View
4 wiki/wikilib.c
@@ -461,12 +461,12 @@ static void handle_button_release(button_t keycode)
{
// static long idx_article = 0;
static int first_time_random = 0;
- int mode;
+ //int mode;
struct keyboard_key *key;
finger_move_speed = 0;
keyboard_key_reset_invert(KEYBOARD_RESET_INVERT_NOW, 0); // reset invert immediately
- mode = keyboard_get_mode();
+ //mode = keyboard_get_mode();
if (keycode == BUTTON_POWER) {
history_list_save(HISTORY_SAVE_POWER_OFF);
delay_us(250000);
Please sign in to comment.
Something went wrong with that request. Please try again.