Blame SOURCES/str-trunc-warn.patch

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