Skip to content

Commit 066aa99

Browse files
committed
aml: suppress all the warnings produced by the crate
In some ways, this isn't great, because we're hiding a few areas where warnings are produced because we're not using some value we probably should be, but all the warnings produced by the crate are quite noisy for downstream users so let's suppress them for now.
1 parent 3759c63 commit 066aa99

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

Diff for: aml/src/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ impl AmlContext {
166166
use value::MethodCode;
167167

168168
match self.namespace.get_by_path(path)?.clone() {
169-
AmlValue::Method { flags, code } => {
169+
// TODO: respect the method's flags
170+
AmlValue::Method { flags: _, code } => {
170171
/*
171172
* First, set up the state we expect to enter the method with, but clearing local
172173
* variables to "null" and setting the arguments. Save the current method state and scope, so if we're
@@ -393,7 +394,7 @@ impl AmlContext {
393394
use core::convert::TryInto;
394395
use value::RegionSpace;
395396

396-
let (region_space, region_base, region_length, parent_device) = {
397+
let (region_space, region_base, _region_length, parent_device) = {
397398
if let AmlValue::OpRegion { region, offset, length, parent_device } =
398399
self.namespace.get(region_handle)?
399400
{
@@ -485,7 +486,7 @@ impl AmlContext {
485486
use core::convert::TryInto;
486487
use value::RegionSpace;
487488

488-
let (region_space, region_base, region_length, parent_device) = {
489+
let (region_space, region_base, _region_length, parent_device) = {
489490
if let AmlValue::OpRegion { region, offset, length, parent_device } =
490491
self.namespace.get(region_handle)?
491492
{

Diff for: aml/src/opcode.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ pub const ROOT_CHAR: u8 = b'\\';
77
pub const PREFIX_CHAR: u8 = b'^';
88

99
pub const RESERVED_FIELD: u8 = 0x00;
10-
pub const ACCESS_FIELD: u8 = 0x01;
11-
pub const CONNECT_FIELD: u8 = 0x02;
12-
pub const EXTENDED_ACCESS_FIELD: u8 = 0x03;
10+
// pub const ACCESS_FIELD: u8 = 0x01;
11+
// pub const CONNECT_FIELD: u8 = 0x02;
12+
// pub const EXTENDED_ACCESS_FIELD: u8 = 0x03;
1313

1414
pub const ZERO_OP: u8 = 0x00;
1515
pub const ONE_OP: u8 = 0x01;

Diff for: aml/src/statement.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ where
284284
match term_list(PkgLength::from_raw_length(body, body.len() as u32).unwrap())
285285
.parse(body, context)
286286
{
287-
Ok((_, new_context, result)) => {
287+
Ok((_, new_context, _result)) => {
288288
context = new_context;
289289
}
290290
Err((_, new_context, Propagate::Break)) => {

Diff for: aml/src/value.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ impl AmlValue {
425425
/// depending on the size of the field.
426426
pub fn read_field(&self, context: &AmlContext) -> Result<AmlValue, AmlError> {
427427
if let AmlValue::Field { region, flags, offset, length } = self {
428-
let maximum_access_size = {
428+
let _maximum_access_size = {
429429
if let AmlValue::OpRegion { region, .. } = context.namespace.get(*region)? {
430430
match region {
431431
RegionSpace::SystemMemory => 64,
@@ -471,7 +471,7 @@ impl AmlValue {
471471
* overwrite the correct bits. We destructure the field to do the actual write, so we read from it if
472472
* needed here, otherwise the borrow-checker doesn't understand.
473473
*/
474-
let field_update_rule = if let AmlValue::Field { region, flags, offset, length } = self {
474+
let field_update_rule = if let AmlValue::Field { flags, .. } = self {
475475
flags.field_update_rule()?
476476
} else {
477477
return Err(AmlError::IncompatibleValueConversion {
@@ -486,7 +486,7 @@ impl AmlValue {
486486
};
487487

488488
if let AmlValue::Field { region, flags, offset, length } = self {
489-
let maximum_access_size = {
489+
let _maximum_access_size = {
490490
if let AmlValue::OpRegion { region, .. } = context.namespace.get(*region)? {
491491
match region {
492492
RegionSpace::SystemMemory => 64,
@@ -519,7 +519,7 @@ impl AmlValue {
519519
}
520520
}
521521

522-
pub fn read_buffer_field(&self, context: &AmlContext) -> Result<AmlValue, AmlError> {
522+
pub fn read_buffer_field(&self, _context: &AmlContext) -> Result<AmlValue, AmlError> {
523523
use bitvec::view::BitView;
524524

525525
if let AmlValue::BufferField { buffer_data, offset, length } = self {
@@ -562,7 +562,7 @@ impl AmlValue {
562562
}
563563
}
564564

565-
pub fn write_buffer_field(&mut self, value: AmlValue, context: &mut AmlContext) -> Result<(), AmlError> {
565+
pub fn write_buffer_field(&mut self, value: AmlValue, _context: &mut AmlContext) -> Result<(), AmlError> {
566566
use bitvec::view::BitView;
567567

568568
if let AmlValue::BufferField { buffer_data, offset, length } = self {

0 commit comments

Comments
 (0)