diff options
author | leo60228 <leo@60228.dev> | 2020-07-21 09:30:01 -0400 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-07-21 19:02:43 +0200 |
commit | 94bce1610a649d80016b6a3443e38eb7d45c387e (patch) | |
tree | 57b81c7194d5a91145ba13359c4a3c94c6c532ff | |
parent | 3e2566d6a76a25da6ac25a99ca30f8c8b45350c8 (diff) |
Change non-fatal errors to warnings
-rw-r--r-- | src/clang.rs | 2 | ||||
-rw-r--r-- | src/codegen/mod.rs | 4 | ||||
-rw-r--r-- | src/codegen/struct_layout.rs | 2 | ||||
-rw-r--r-- | src/ir/context.rs | 6 | ||||
-rw-r--r-- | src/ir/item.rs | 2 | ||||
-rw-r--r-- | src/ir/ty.rs | 4 | ||||
-rw-r--r-- | src/regex_set.rs | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/src/clang.rs b/src/clang.rs index 28fce4c3..1e6728cc 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -796,7 +796,7 @@ impl ClangToken { // expressions, so we strip them down here. CXToken_Comment => return None, _ => { - error!("Found unexpected token kind: {:?}", self); + warn!("Found unexpected token kind: {:?}", self); return None; } }; diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 026c2ff9..c68eb6da 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -449,7 +449,7 @@ impl CodeGenerator for Item { // TODO(emilio, #453): Figure out what to do when this happens // legitimately, we could track the opaque stuff and disable the // assertion there I guess. - error!("Found non-whitelisted item in code generation: {:?}", self); + warn!("Found non-whitelisted item in code generation: {:?}", self); } result.set_seen(self.id()); @@ -3938,7 +3938,7 @@ pub(crate) fn codegen( "Your dot file was generated successfully into: {}", path ), - Err(e) => error!("{}", e), + Err(e) => warn!("{}", e), } } diff --git a/src/codegen/struct_layout.rs b/src/codegen/struct_layout.rs index 900f2586..54dfd86e 100644 --- a/src/codegen/struct_layout.rs +++ b/src/codegen/struct_layout.rs @@ -248,7 +248,7 @@ impl<'a> StructLayoutTracker<'a> { ); if layout.size < self.latest_offset { - error!( + warn!( "Calculated wrong layout for {}, too more {} bytes", self.name, self.latest_offset - layout.size diff --git a/src/ir/context.rs b/src/ir/context.rs index 901daa3a..38d73b7e 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -2400,15 +2400,15 @@ If you encounter an error missing from this list, please file an issue or a PR!" self.codegen_items = Some(codegen_items); for item in self.options().whitelisted_functions.unmatched_items() { - error!("unused option: --whitelist-function {}", item); + warn!("unused option: --whitelist-function {}", item); } for item in self.options().whitelisted_vars.unmatched_items() { - error!("unused option: --whitelist-var {}", item); + warn!("unused option: --whitelist-var {}", item); } for item in self.options().whitelisted_types.unmatched_items() { - error!("unused option: --whitelist-type {}", item); + warn!("unused option: --whitelist-type {}", item); } } diff --git a/src/ir/item.rs b/src/ir/item.rs index 8e77ad71..0f94f020 100644 --- a/src/ir/item.rs +++ b/src/ir/item.rs @@ -1428,7 +1428,7 @@ impl ClangItemParser for Item { // ignore toplevel operator overloads let spelling = cursor.spelling(); if !spelling.starts_with("operator") { - error!( + warn!( "Unhandled cursor kind {:?}: {:?}", cursor.kind(), cursor diff --git a/src/ir/ty.rs b/src/ir/ty.rs index b77b5e75..c1560ac3 100644 --- a/src/ir/ty.rs +++ b/src/ir/ty.rs @@ -973,7 +973,7 @@ impl Type { let inner_type = match inner { Ok(inner) => inner, Err(..) => { - error!( + warn!( "Failed to parse template alias \ {:?}", location @@ -1196,7 +1196,7 @@ impl Type { return Err(ParseError::Continue); } _ => { - error!( + warn!( "unsupported type: kind = {:?}; ty = {:?}; at {:?}", ty.kind(), ty, diff --git a/src/regex_set.rs b/src/regex_set.rs index 4e822824..127c0018 100644 --- a/src/regex_set.rs +++ b/src/regex_set.rs @@ -58,7 +58,7 @@ impl RegexSet { self.set = match RxSet::new(items) { Ok(x) => Some(x), Err(e) => { - error!("Invalid regex in {:?}: {:?}", self.items, e); + warn!("Invalid regex in {:?}: {:?}", self.items, e); None } } |