Skip to contentSkip to conversation

iASL: Predefine names: make argument errors more understandable

PATCH New Colin King 1 participant 1 message Jan 24, 2017 ACPI component architecture (acpica)

lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 iASL: Predefine names: make argument errors more understandable

From: Colin Ian King <colin.king(a)canonical.com>

The current errors print out the number of arguments but is not clear what these values mean. Clarify the error messages by specifically mentioning that these refer to the number of arguments. I took the liberty to replace the %u and 0 with the text 'zero' to match the style found in other similar error messages.

Signed-off-by Colin Ian King <colin.king(a)canonical.com>
---
 source/compiler/aslpredef.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
source/compiler/aslpredef.c +2 -2
index 1218401..9dcc757 100644
@@ -186,7 +186,7 @@ ApCheckForPredefinedMethod (
 
         if (MethodInfo->NumArguments != 0)
         {
-            sprintf (MsgBuffer, "%s requires %u", Op->Asl.ExternalName, 0);
+            sprintf (MsgBuffer, "%s requires zero arguments", Op->Asl.ExternalName);
 
             AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
                 MsgBuffer);
@@ -208,7 +208,7 @@ ApCheckForPredefinedMethod (
 
         if (MethodInfo->NumArguments != RequiredArgCount)
         {
-            sprintf (MsgBuffer, "%4.4s requires %u",
+            sprintf (MsgBuffer, "%4.4s requires %u arguments",
                 ThisName->Info.Name, RequiredArgCount);
 
             if (MethodInfo->NumArguments < RequiredArgCount)
Signature · 1 line
2.10.2