diff options
author | Brian J. Burg <burg@cs.washington.edu> | 2012-09-19 17:49:55 -0700 |
---|---|---|
committer | Brian J. Burg <burg@cs.washington.edu> | 2012-09-19 17:49:55 -0700 |
commit | f3a8253bc8728e67f88334ef0c7d4b0590557d28 (patch) | |
tree | 4910b056cbd65cf16959f66050afdc1ebf47bf45 | |
parent | da7ae8a280b2165e14113c6ae6ebe5ac7a1ebf36 (diff) | |
download | servo-f3a8253bc8728e67f88334ef0c7d4b0590557d28.tar.gz servo-f3a8253bc8728e67f88334ef0c7d4b0590557d28.zip |
Fix some unused variable compiler warnings.
-rw-r--r-- | src/servo/css/parser_util.rs | 10 | ||||
-rw-r--r-- | src/servo/gfx/render_task.rs | 2 | ||||
-rw-r--r-- | src/servo/layout/base.rs | 4 | ||||
-rw-r--r-- | src/servo/layout/block.rs | 14 | ||||
-rw-r--r-- | src/servo/layout/box_builder.rs | 2 | ||||
-rw-r--r-- | src/servo/layout/inline.rs | 6 | ||||
-rw-r--r-- | src/servo/text/text_run.rs | 2 |
7 files changed, 19 insertions, 21 deletions
diff --git a/src/servo/css/parser_util.rs b/src/servo/css/parser_util.rs index 19c159aceed..0c680ec9137 100644 --- a/src/servo/css/parser_util.rs +++ b/src/servo/css/parser_util.rs @@ -51,7 +51,7 @@ fn parse_relative_size(str: ~str) -> ParseResult<RelativeSize> { } } -fn parse_font_size(str: ~str) -> ParseResult<CSSFontSize> { +fn parse_font_size(_str: ~str) -> ParseResult<CSSFontSize> { // TODO: complete me Value(LengthSize(Px(14.0))) } @@ -86,8 +86,8 @@ mod test { fn should_match_font_sizes() { let input = ~"* {font-size:12px; font-size:inherit; font-size:200%; font-size:x-small}"; let token_port = spawn_css_lexer_from_string(input); - let actual_rule = build_stylesheet(token_port); - let expected_rule : Stylesheet = ~[~(~[~Element(~"*", ~[])], + let _actual_rule = build_stylesheet(token_port); + let _expected_rule : Stylesheet = ~[~(~[~Element(~"*", ~[])], ~[FontSize(Specified(LengthSize(Px(12.0)))), FontSize(Specified(PercentSize(100.0))), FontSize(Specified(PercentSize(200.0))), @@ -101,8 +101,8 @@ mod test { fn should_match_width_height() { let input = ~"* {width:20%; height:auto; width:20px; width:3in; height:70px; height:30px}"; let token_port = spawn_css_lexer_from_string(input); - let actual_rule = build_stylesheet(token_port); - let expected_rule : Stylesheet = ~[~(~[~Element(~"*", ~[])], + let _actual_rule = build_stylesheet(token_port); + let _expected_rule : Stylesheet = ~[~(~[~Element(~"*", ~[])], ~[Width(Specified(BoxPercent(20.0))), Height(Specified(BoxAuto)), Width(Specified(BoxLength(Px(20.0)))), diff --git a/src/servo/gfx/render_task.rs b/src/servo/gfx/render_task.rs index 6e438f4cef9..b1214a6c70a 100644 --- a/src/servo/gfx/render_task.rs +++ b/src/servo/gfx/render_task.rs @@ -146,8 +146,6 @@ pub fn draw_glyphs(ctx: &RenderContext, bounds: Rect<au>, text_run: &GlyphRun) { AzReleaseColorPattern}; use azure::cairo::bindgen::cairo_scaled_font_destroy; - let draw_target = ctx.canvas.azure_draw_target; - // FIXME: font should be accessible from GlyphRun let font = ctx.font_cache.get_test_font(); diff --git a/src/servo/layout/base.rs b/src/servo/layout/base.rs index 98980704dfb..1bde59b569b 100644 --- a/src/servo/layout/base.rs +++ b/src/servo/layout/base.rs @@ -367,7 +367,7 @@ impl @RenderBox { * `origin` - Total offset from display list root flow to this box's owning flow * `list` - List to which items should be appended */ - fn build_display_list(builder: &dl::DisplayListBuilder, dirty: &Rect<au>, + fn build_display_list(_builder: &dl::DisplayListBuilder, dirty: &Rect<au>, offset: &Point2D<au>, list: &dl::DisplayList) { if !self.data.position.intersects(dirty) { return; @@ -478,7 +478,7 @@ impl @FlowContext : DebugMethods { }, BlockFlow(d) => { match d.box { - Some(b) => fmt!("BlockFlow(box=b%?)", d.box.get().id), + Some(_b) => fmt!("BlockFlow(box=b%?)", d.box.get().id), None => ~"BlockFlow", } }, diff --git a/src/servo/layout/block.rs b/src/servo/layout/block.rs index d0bb7ed1547..38203596b68 100644 --- a/src/servo/layout/block.rs +++ b/src/servo/layout/block.rs @@ -77,7 +77,7 @@ impl @FlowContext : BlockLayout { /* TODO: floats */ /* TODO: absolute contexts */ /* TODO: inline-blocks */ - fn bubble_widths_block(ctx: &LayoutContext) { + fn bubble_widths_block(_ctx: &LayoutContext) { assert self.starts_block_flow(); let mut min_width = au(0); @@ -109,11 +109,11 @@ impl @FlowContext : BlockLayout { Dual boxes consume some width first, and the remainder is assigned to all child (block) contexts. */ - fn assign_widths_block(ctx: &LayoutContext) { + fn assign_widths_block(_ctx: &LayoutContext) { assert self.starts_block_flow(); let mut remaining_width = self.data.position.size.width; - let mut right_used = au(0); + let mut _right_used = au(0); let mut left_used = au(0); /* Let the box consume some width. It will return the amount remaining @@ -131,7 +131,7 @@ impl @FlowContext : BlockLayout { } } - fn assign_height_block(ctx: &LayoutContext) { + fn assign_height_block(_ctx: &LayoutContext) { assert self.starts_block_flow(); let mut cur_y = au(0); @@ -143,13 +143,13 @@ impl @FlowContext : BlockLayout { self.data.position.size.height = cur_y; - let used_top = au(0); - let used_bot = au(0); + let _used_top = au(0); + let _used_bot = au(0); do self.with_block_box |box| { box.data.position.origin.y = au(0); box.data.position.size.height = cur_y; - let (used_top, used_bot) = box.get_used_height(); + let (_used_top, _used_bot) = box.get_used_height(); } } diff --git a/src/servo/layout/box_builder.rs b/src/servo/layout/box_builder.rs index d0089d423db..8d6048f883a 100644 --- a/src/servo/layout/box_builder.rs +++ b/src/servo/layout/box_builder.rs @@ -139,7 +139,7 @@ impl LayoutTreeBuilder { } } - fn fixup_split_inline(foo: @FlowContext) { + fn fixup_split_inline(_foo: @FlowContext) { // TODO: finish me. fail ~"TODO: handle case where an inline is split by a block" } diff --git a/src/servo/layout/inline.rs b/src/servo/layout/inline.rs index f052dcf2ba9..fe1e2527fdb 100644 --- a/src/servo/layout/inline.rs +++ b/src/servo/layout/inline.rs @@ -67,7 +67,7 @@ impl @FlowContext : InlineLayout { } } - fn bubble_widths_inline(ctx: &LayoutContext) { + fn bubble_widths_inline(_ctx: &LayoutContext) { assert self.starts_inline_flow(); let mut min_width = au(0); @@ -87,7 +87,7 @@ impl @FlowContext : InlineLayout { /* Recursively (top-down) determines the actual width of child contexts and boxes. When called on this context, the context has had its width set by the parent context. */ - fn assign_widths_inline(ctx: &LayoutContext) { + fn assign_widths_inline(_ctx: &LayoutContext) { assert self.starts_inline_flow(); /* Perform inline flow with the available width. */ @@ -138,7 +138,7 @@ impl @FlowContext : InlineLayout { } // fn assign_widths_inline - fn assign_height_inline(ctx: &LayoutContext) { + fn assign_height_inline(_ctx: &LayoutContext) { // Don't need to set box or ctx heights, since that is done // during inline flowing. } diff --git a/src/servo/text/text_run.rs b/src/servo/text/text_run.rs index c0ca6622aef..45d56a2ceaa 100644 --- a/src/servo/text/text_run.rs +++ b/src/servo/text/text_run.rs @@ -102,7 +102,7 @@ fn calc_min_break_width(font: &Font, text: &str) -> au { } /// Iterates over all the indivisible substrings -fn iter_indivisible_slices(font: &Font, text: &r/str, +fn iter_indivisible_slices(_font: &Font, text: &r/str, f: fn((&r/str)) -> bool) { let mut curr = text; |