Remove some warnings

This commit is contained in:
Jeremy Soller
2020-02-07 20:06:33 -07:00
parent 64f962e02b
commit 7658193271
3 changed files with 7 additions and 7 deletions

View File

@@ -68,7 +68,7 @@ pub fn parse_arg_obj(data: &[u8],
}
match data[0] {
0x68 ... 0x6E => Ok(AmlParseType {
0x68 ..= 0x6E => Ok(AmlParseType {
val: AmlValue::ObjectReference(ObjectReference::ArgObj(data[0] - 0x68)),
len: 1 as usize
}),
@@ -87,7 +87,7 @@ pub fn parse_local_obj(data: &[u8],
}
match data[0] {
0x68 ... 0x6E => Ok(AmlParseType {
0x68 ..= 0x6E => Ok(AmlParseType {
val: AmlValue::ObjectReference(ObjectReference::LocalObj(data[0] - 0x60)),
len: 1 as usize
}),

View File

@@ -498,7 +498,7 @@ fn parse_def_op_region(data: &[u8], ctx: &mut AmlExecutionContext) -> ParseResul
0x07 => RegionSpace::IPMI,
0x08 => RegionSpace::GeneralPurposeIO,
0x09 => RegionSpace::GenericSerialBus,
0x80 ... 0xFF => RegionSpace::UserDefined(data[2 + name.len]),
0x80 ..= 0xFF => RegionSpace::UserDefined(data[2 + name.len]),
_ => return Err(AmlError::AmlParseError("OpRegion - invalid region"))
};

View File

@@ -62,22 +62,22 @@ fn parse_null_name(data: &[u8]) -> Result<(Vec<u8>, usize), AmlError> {
pub fn parse_name_seg(data: &[u8]) -> Result<(Vec<u8>, usize), AmlError> {
match data[0] {
0x41 ... 0x5A | 0x5F => (),
0x41 ..= 0x5A | 0x5F => (),
_ => return Err(AmlError::AmlInvalidOpCode)
}
match data[1] {
0x30 ... 0x39 | 0x41 ... 0x5A | 0x5F => (),
0x30 ..= 0x39 | 0x41 ..= 0x5A | 0x5F => (),
_ => return Err(AmlError::AmlInvalidOpCode)
}
match data[2] {
0x30 ... 0x39 | 0x41 ... 0x5A | 0x5F => (),
0x30 ..= 0x39 | 0x41 ..= 0x5A | 0x5F => (),
_ => return Err(AmlError::AmlInvalidOpCode)
}
match data[3] {
0x30 ... 0x39 | 0x41 ... 0x5A | 0x5F => (),
0x30 ..= 0x39 | 0x41 ..= 0x5A | 0x5F => (),
_ => return Err(AmlError::AmlInvalidOpCode)
}