diff options
author | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-04-02 03:02:36 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-04-02 03:29:56 +0200 |
commit | ebc6381b6028a5e078aef0a7a1240be0737441e6 (patch) | |
tree | 74f54a3618ea39b9602b2d7078d49cd0f022f2b7 | |
parent | 120a014640584102c2c3dc9a88a57e936c114075 (diff) |
Silence build warnings
-rw-r--r-- | src/parser.rs | 20 | ||||
-rw-r--r-- | src/types.rs | 1 |
2 files changed, 1 insertions, 20 deletions
diff --git a/src/parser.rs b/src/parser.rs index cdbe80ea..a5c5bc51 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -2,7 +2,6 @@ use std::collections::{HashMap, HashSet}; use std::cell::RefCell; -use std::ops::Deref; use std::rc::Rc; use std::path::Path; @@ -52,10 +51,6 @@ impl<'a> ClangParserCtx<'a> { fn current_module_mut(&mut self) -> &mut Module { self.module_map.get_mut(&self.current_module_id).expect("Module not found!") } - - fn module_mut(&mut self, id: &ModuleId) -> &mut Module { - self.module_map.get_mut(id).expect("Module not found!") - } } fn match_pattern(ctx: &mut ClangParserCtx, cursor: &Cursor) -> bool { @@ -225,10 +220,6 @@ fn get_abi(cc: Enum_CXCallingConv) -> abi::Abi { } } -fn conv_ptr_ty(ctx: &mut ClangParserCtx, ty: &cx::Type, cursor: &Cursor, is_ref: bool, layout: Layout) -> il::Type { - conv_ptr_ty_resolving_typedefs(ctx, ty, cursor, is_ref, layout, false) -} - fn conv_ptr_ty_resolving_typedefs(ctx: &mut ClangParserCtx, ty: &cx::Type, cursor: &Cursor, @@ -525,17 +516,6 @@ fn visit_composite(cursor: &Cursor, parent: &Cursor, } } - fn inner_composite(mut ty: &il::Type) -> Option<&Rc<RefCell<CompInfo>>> { - loop { - match *ty { - TComp(ref comp_ty) => return Some(comp_ty), - TPtr(ref ptr_ty, _, _, _) => ty = &**ptr_ty, - TArray(ref array_ty, _, _) => ty = &**array_ty, - _ => return None - } - } - } - match cursor.kind() { CXCursor_TypedefDecl => { ci.typedefs.push(cursor.spelling().to_owned()); diff --git a/src/types.rs b/src/types.rs index 88e1b4a6..d16ee4df 100644 --- a/src/types.rs +++ b/src/types.rs @@ -280,6 +280,7 @@ pub enum FKind { pub enum CompMember { Field(FieldInfo), Comp(Rc<RefCell<CompInfo>>), + #[allow(dead_code)] CompField(Rc<RefCell<CompInfo>>, FieldInfo), Enum(Rc<RefCell<EnumInfo>>), } |