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