diff --git a/source/compiler/asllookup.c b/source/compiler/asllookup.c index fed35fd..cda5976 100644 --- a/source/compiler/asllookup.c +++ b/source/compiler/asllookup.c @@ -122,6 +122,8 @@ LkIsObjectUsed ( ASL_METHOD_LOCAL *MethodLocals; ASL_METHOD_LOCAL *MethodArgs; UINT32 i; + ACPI_NAME_UNION NodeName; + ACPI_NAME_UNION NextName; if (Node->Type == ACPI_TYPE_METHOD) @@ -175,7 +177,8 @@ LkIsObjectUsed ( * We ignore the predefined methods since often, not * all arguments are needed or used. */ - if ((Node->Name.Ascii[0] != '_') && + ACPI_MOVE_32_TO_32(&NodeName.Ascii, Node->Name.Ascii); + if ((NodeName.Ascii[0] != '_') && (!(MethodArgs[i].Flags & ASL_ARG_REFERENCED))) { sprintf (MsgBuffer, "Arg%u", i); @@ -228,8 +231,10 @@ LkIsObjectUsed ( * Issue a remark even if it is a reserved name (starts * with an underscore). */ + ACPI_MOVE_32_TO_32(&NodeName.Ascii, Node->Name.Ascii); + ACPI_MOVE_32_TO_32(&NextName.Ascii, Next->Name.Ascii); sprintf (MsgBuffer, "Name [%4.4s] is within a method [%4.4s]", - Node->Name.Ascii, Next->Name.Ascii); + NodeName.Ascii, NextName.Ascii); AslError (ASL_REMARK, ASL_MSG_NOT_REFERENCED, LkGetNameOp (Node->Op), MsgBuffer); return (AE_OK);