mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
acpi: fix linter warnings for unhandled errors in AML parser
This commit is contained in:
parent
61449a15a1
commit
d9bd6f104e
@ -590,7 +590,7 @@ func (p *Parser) parseFieldList(op opcode, args []interface{}, maxReadOffset uin
|
|||||||
accessAttrib = FieldAccessAttribRawProcessBytes
|
accessAttrib = FieldAccessAttribRawProcessBytes
|
||||||
}
|
}
|
||||||
default: // NamedField
|
default: // NamedField
|
||||||
p.r.UnreadByte()
|
_ = p.r.UnreadByte()
|
||||||
if unitName, ok = p.parseNameString(); !ok {
|
if unitName, ok = p.parseNameString(); !ok {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -857,10 +857,10 @@ func (p *Parser) parseNameString() (string, bool) {
|
|||||||
switch next {
|
switch next {
|
||||||
case '\\': // RootChar
|
case '\\': // RootChar
|
||||||
str = append(str, next)
|
str = append(str, next)
|
||||||
p.r.ReadByte()
|
_, _ = p.r.ReadByte()
|
||||||
case '^': // PrefixPath := Nothing | '^' PrefixPath
|
case '^': // PrefixPath := Nothing | '^' PrefixPath
|
||||||
str = append(str, next)
|
str = append(str, next)
|
||||||
p.r.ReadByte()
|
_, _ = p.r.ReadByte()
|
||||||
for {
|
for {
|
||||||
next, err = p.r.PeekByte()
|
next, err = p.r.PeekByte()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -872,7 +872,7 @@ func (p *Parser) parseNameString() (string, bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
str = append(str, next)
|
str = append(str, next)
|
||||||
p.r.ReadByte()
|
_, _ = p.r.ReadByte()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user