|
|
214d7a |
Index: acpica-unix2-20200925/source/compiler/aslanalyze.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20200925.orig/source/compiler/aslanalyze.c
|
|
|
214d7a |
+++ acpica-unix2-20200925/source/compiler/aslanalyze.c
|
|
|
214d7a |
@@ -358,11 +358,16 @@ AnCheckMethodReturnValue (
|
|
|
214d7a |
*/
|
|
|
214d7a |
if (ThisNodeBtype != 0)
|
|
|
214d7a |
{
|
|
|
214d7a |
- sprintf (AslGbl_MsgBuffer,
|
|
|
214d7a |
+ int cnt;
|
|
|
214d7a |
+ char *strp;
|
|
|
214d7a |
+
|
|
|
214d7a |
+ cnt = asprintf (&strp,
|
|
|
214d7a |
"Method returns [%s], %s operator requires [%s]",
|
|
|
214d7a |
AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
|
|
|
214d7a |
|
|
|
214d7a |
- AslError (ASL_WARNING, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer);
|
|
|
214d7a |
+ AslError (ASL_WARNING, ASL_MSG_INVALID_TYPE, ArgOp, strp);
|
|
|
214d7a |
+ if (cnt > 0)
|
|
|
214d7a |
+ free(strp);
|
|
|
214d7a |
}
|
|
|
214d7a |
}
|
|
|
214d7a |
|
|
|
214d7a |
Index: acpica-unix2-20200925/source/compiler/aslpredef.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20200925.orig/source/compiler/aslpredef.c
|
|
|
214d7a |
+++ acpica-unix2-20200925/source/compiler/aslpredef.c
|
|
|
214d7a |
@@ -159,14 +159,19 @@ ApCheckForPredefinedMethod (
|
|
|
214d7a |
if (MethodInfo->NumReturnNoValue &&
|
|
|
214d7a |
ThisName->Info.ExpectedBtypes)
|
|
|
214d7a |
{
|
|
|
214d7a |
+ int cnt;
|
|
|
214d7a |
+ char *strp;
|
|
|
214d7a |
+
|
|
|
214d7a |
AcpiUtGetExpectedReturnTypes (AslGbl_StringBuffer,
|
|
|
214d7a |
ThisName->Info.ExpectedBtypes);
|
|
|
214d7a |
|
|
|
214d7a |
- sprintf (AslGbl_MsgBuffer, "%s required for %4.4s",
|
|
|
214d7a |
- AslGbl_StringBuffer, ThisName->Info.Name);
|
|
|
214d7a |
+ cnt = asprintf (&strp, "%s required for %4.4s",
|
|
|
214d7a |
+ AslGbl_StringBuffer, ThisName->Info.Name);
|
|
|
214d7a |
|
|
|
214d7a |
AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op,
|
|
|
214d7a |
- AslGbl_MsgBuffer);
|
|
|
214d7a |
+ strp);
|
|
|
214d7a |
+ if (cnt > 0)
|
|
|
214d7a |
+ free(strp);
|
|
|
214d7a |
}
|
|
|
214d7a |
break;
|
|
|
214d7a |
}
|
|
|
214d7a |
@@ -698,18 +703,26 @@ TypeErrorExit:
|
|
|
214d7a |
|
|
|
214d7a |
AcpiUtGetExpectedReturnTypes (AslGbl_StringBuffer, ExpectedBtypes);
|
|
|
214d7a |
|
|
|
214d7a |
- if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
|
|
|
214d7a |
- {
|
|
|
214d7a |
- sprintf (AslGbl_MsgBuffer, "%4.4s: found %s, %s required",
|
|
|
214d7a |
- PredefinedName, TypeName, AslGbl_StringBuffer);
|
|
|
214d7a |
- }
|
|
|
214d7a |
- else
|
|
|
214d7a |
{
|
|
|
214d7a |
- sprintf (AslGbl_MsgBuffer, "%4.4s: found %s at index %u, %s required",
|
|
|
214d7a |
- PredefinedName, TypeName, PackageIndex, AslGbl_StringBuffer);
|
|
|
214d7a |
+ int cnt;
|
|
|
214d7a |
+ char *strp;
|
|
|
214d7a |
+
|
|
|
214d7a |
+ if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
|
|
|
214d7a |
+ {
|
|
|
214d7a |
+ cnt = asprintf (&strp, "%4.4s: found %s, %s required",
|
|
|
214d7a |
+ PredefinedName, TypeName, AslGbl_StringBuffer);
|
|
|
214d7a |
+ }
|
|
|
214d7a |
+ else
|
|
|
214d7a |
+ {
|
|
|
214d7a |
+ cnt = asprintf (&strp, "%4.4s: found %s at index %u, %s required",
|
|
|
214d7a |
+ PredefinedName, TypeName, PackageIndex, AslGbl_StringBuffer);
|
|
|
214d7a |
+ }
|
|
|
214d7a |
+
|
|
|
214d7a |
+ AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, strp);
|
|
|
214d7a |
+ if (cnt > 0)
|
|
|
214d7a |
+ free(strp);
|
|
|
214d7a |
}
|
|
|
214d7a |
|
|
|
214d7a |
- AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, AslGbl_MsgBuffer);
|
|
|
214d7a |
return (AE_TYPE);
|
|
|
214d7a |
}
|
|
|
214d7a |
|
|
|
214d7a |
Index: acpica-unix2-20200925/source/compiler/aslwalks.c
|
|
|
214d7a |
===================================================================
|
|
|
214d7a |
--- acpica-unix2-20200925.orig/source/compiler/aslwalks.c
|
|
|
214d7a |
+++ acpica-unix2-20200925/source/compiler/aslwalks.c
|
|
|
214d7a |
@@ -515,15 +515,19 @@ AnOperandTypecheckWalkEnd (
|
|
|
214d7a |
else if (!CommonBtypes)
|
|
|
214d7a |
{
|
|
|
214d7a |
/* No match -- this is a type mismatch error */
|
|
|
214d7a |
+ int cnt;
|
|
|
214d7a |
+ char *strp;
|
|
|
214d7a |
|
|
|
214d7a |
AnFormatBtype (AslGbl_StringBuffer, ThisNodeBtype);
|
|
|
214d7a |
AnFormatBtype (AslGbl_StringBuffer2, RequiredBtypes);
|
|
|
214d7a |
|
|
|
214d7a |
- sprintf (AslGbl_MsgBuffer, "[%s] found, %s operator requires [%s]",
|
|
|
214d7a |
+ cnt = asprintf (&strp, "[%s] found, %s operator requires [%s]",
|
|
|
214d7a |
AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
|
|
|
214d7a |
|
|
|
214d7a |
AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE,
|
|
|
214d7a |
- ArgOp, AslGbl_MsgBuffer);
|
|
|
214d7a |
+ ArgOp, strp);
|
|
|
214d7a |
+ if (cnt > 0)
|
|
|
214d7a |
+ free(strp);
|
|
|
214d7a |
}
|
|
|
214d7a |
|
|
|
214d7a |
NextArgument:
|