214d7a
Use proper integer formatting
214d7a
214d7a
From: Al Stone <ahs3@redhat.com>
214d7a
214d7a
214d7a
---
214d7a
 source/compiler/aslerror.c              |    4 ++--
214d7a
 source/compiler/aslopt.c                |    2 +-
214d7a
 source/compiler/aslprepkg.c             |    2 +-
214d7a
 source/components/debugger/dbexec.c     |    2 +-
214d7a
 source/components/dispatcher/dsmthdat.c |    4 ++--
214d7a
 source/components/dispatcher/dsutils.c  |    2 +-
214d7a
 source/components/dispatcher/dswscope.c |    4 ++--
214d7a
 source/components/events/evgpe.c        |    4 ++--
214d7a
 source/components/executer/exdump.c     |    2 +-
214d7a
 source/components/executer/exfldio.c    |    4 ++--
214d7a
 source/components/executer/exnames.c    |    4 ++--
214d7a
 source/components/hardware/hwregs.c     |    2 +-
214d7a
 source/components/tables/tbfadt.c       |    6 +++---
214d7a
 source/components/tables/tbxfroot.c     |    6 +++---
214d7a
 source/components/utilities/utownerid.c |    2 +-
214d7a
 18 files changed, 28 insertions(+), 28 deletions(-)
214d7a
214d7a
Index: acpica-unix2-20200925/source/compiler/aslerror.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/compiler/aslerror.c
214d7a
+++ acpica-unix2-20200925/source/compiler/aslerror.c
214d7a
@@ -917,7 +917,7 @@ AslLogNewError (
214d7a
     AslGbl_ExceptionCount[ModifiedLevel]++;
214d7a
     if (!AslGbl_IgnoreErrors && AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
214d7a
     {
214d7a
-        printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT);
214d7a
+        printf ("\nMaximum error count (%d) exceeded\n", ASL_MAX_ERROR_COUNT);
214d7a
 
214d7a
         AslGbl_SourceLine = 0;
214d7a
         AslGbl_NextError = AslGbl_ErrorLog;
214d7a
Index: acpica-unix2-20200925/source/compiler/aslopt.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/compiler/aslopt.c
214d7a
+++ acpica-unix2-20200925/source/compiler/aslopt.c
214d7a
@@ -583,7 +583,7 @@ OptOptimizeNamePath (
214d7a
     }
214d7a
 
214d7a
     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS,
214d7a
-        "PATH OPTIMIZE: Line %5d ParentOp [%12.12s] ThisOp [%12.12s] ",
214d7a
+        "PATH OPTIMIZE: Line %5u ParentOp [%12.12s] ThisOp [%12.12s] ",
214d7a
         Op->Asl.LogicalLineNumber,
214d7a
         AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode),
214d7a
         AcpiPsGetOpcodeName (Op->Common.AmlOpcode)));
214d7a
Index: acpica-unix2-20200925/source/compiler/aslprepkg.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/compiler/aslprepkg.c
214d7a
+++ acpica-unix2-20200925/source/compiler/aslprepkg.c
214d7a
@@ -320,7 +320,7 @@ ApCheckPackage (
214d7a
 
214d7a
         if (Count & 1)
214d7a
         {
214d7a
-            sprintf (AslGbl_MsgBuffer, "%4.4s: Package length, %d, must be even.",
214d7a
+            sprintf (AslGbl_MsgBuffer, "%4.4s: Package length, %u, must be even.",
214d7a
                 Predefined->Info.Name, Count);
214d7a
 
214d7a
             AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH,
214d7a
Index: acpica-unix2-20200925/source/components/debugger/dbexec.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/debugger/dbexec.c
214d7a
+++ acpica-unix2-20200925/source/components/debugger/dbexec.c
214d7a
@@ -231,7 +231,7 @@ AcpiDbExecuteMethod (
214d7a
             ACPI_ERROR ((AE_INFO,
214d7a
                 "Possible buffer overflow within AML Debugger "
214d7a
                 "buffer (size 0x%X needed 0x%X)",
214d7a
-                ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
214d7a
+                (UINT32) ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
214d7a
         }
214d7a
     }
214d7a
 
214d7a
Index: acpica-unix2-20200925/source/components/dispatcher/dsmthdat.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/dispatcher/dsmthdat.c
214d7a
+++ acpica-unix2-20200925/source/components/dispatcher/dsmthdat.c
214d7a
@@ -291,7 +291,7 @@ AcpiDsMethodDataGetNode (
214d7a
         if (Index > ACPI_METHOD_MAX_LOCAL)
214d7a
         {
214d7a
             ACPI_ERROR ((AE_INFO,
214d7a
-                "Local index %u is invalid (max %u)",
214d7a
+                "Local index %u is invalid (max %d)",
214d7a
                 Index, ACPI_METHOD_MAX_LOCAL));
214d7a
             return_ACPI_STATUS (AE_AML_INVALID_INDEX);
214d7a
         }
214d7a
@@ -306,7 +306,7 @@ AcpiDsMethodDataGetNode (
214d7a
         if (Index > ACPI_METHOD_MAX_ARG)
214d7a
         {
214d7a
             ACPI_ERROR ((AE_INFO,
214d7a
-                "Arg index %u is invalid (max %u)",
214d7a
+                "Arg index %u is invalid (max %d)",
214d7a
                 Index, ACPI_METHOD_MAX_ARG));
214d7a
             return_ACPI_STATUS (AE_AML_INVALID_INDEX);
214d7a
         }
214d7a
Index: acpica-unix2-20200925/source/components/dispatcher/dsutils.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/dispatcher/dsutils.c
214d7a
+++ acpica-unix2-20200925/source/components/dispatcher/dsutils.c
214d7a
@@ -786,7 +786,7 @@ AcpiDsCreateOperands (
214d7a
     }
214d7a
 
214d7a
     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
214d7a
-        "NumOperands %d, ArgCount %d, Index %d\n",
214d7a
+        "NumOperands %d, ArgCount %u, Index %u\n",
214d7a
         WalkState->NumOperands, ArgCount, Index));
214d7a
 
214d7a
     /* Create the interpreter arguments, in reverse order */
214d7a
Index: acpica-unix2-20200925/source/components/dispatcher/dswscope.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/dispatcher/dswscope.c
214d7a
+++ acpica-unix2-20200925/source/components/dispatcher/dswscope.c
214d7a
@@ -149,7 +149,7 @@ AcpiDsScopeStackPush (
214d7a
     WalkState->ScopeDepth++;
214d7a
 
214d7a
     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
214d7a
-        "[%.2d] Pushed scope ", (UINT32) WalkState->ScopeDepth));
214d7a
+        "[%.2d] Pushed scope ", WalkState->ScopeDepth));
214d7a
 
214d7a
     OldScopeInfo = WalkState->ScopeInfo;
214d7a
     if (OldScopeInfo)
214d7a
@@ -211,7 +211,7 @@ AcpiDsScopeStackPop (
214d7a
     WalkState->ScopeDepth--;
214d7a
 
214d7a
     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
214d7a
-        "[%.2d] Popped scope [%4.4s] (%s), New scope -> ",
214d7a
+        "[%.2u] Popped scope [%4.4s] (%s), New scope -> ",
214d7a
         (UINT32) WalkState->ScopeDepth,
214d7a
         AcpiUtGetNodeName (ScopeInfo->Scope.Node),
214d7a
         AcpiUtGetTypeName (ScopeInfo->Common.Value)));
214d7a
Index: acpica-unix2-20200925/source/components/events/evgpe.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/events/evgpe.c
214d7a
+++ acpica-unix2-20200925/source/components/events/evgpe.c
214d7a
@@ -488,7 +488,7 @@ AcpiEvGpeDetect (
214d7a
                     "Ignore disabled registers for GPE %02X-%02X: "
214d7a
                     "RunEnable=%02X, WakeEnable=%02X\n",
214d7a
                     GpeRegisterInfo->BaseGpeNumber,
214d7a
-                    GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
214d7a
+                    (unsigned int) (GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1)),
214d7a
                     GpeRegisterInfo->EnableForRun,
214d7a
                     GpeRegisterInfo->EnableForWake));
214d7a
                 continue;
214d7a
Index: acpica-unix2-20200925/source/components/executer/exdump.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/executer/exdump.c
214d7a
+++ acpica-unix2-20200925/source/components/executer/exdump.c
214d7a
@@ -678,7 +678,7 @@ AcpiExDumpOperand (
214d7a
     if (Depth > 0)
214d7a
     {
214d7a
         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p Refs=%u ",
214d7a
-            Depth, " ", Depth, ObjDesc, ObjDesc->Common.ReferenceCount));
214d7a
+            (int) Depth, " ", Depth, ObjDesc, ObjDesc->Common.ReferenceCount));
214d7a
     }
214d7a
     else
214d7a
     {
214d7a
Index: acpica-unix2-20200925/source/components/executer/exfldio.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/executer/exfldio.c
214d7a
+++ acpica-unix2-20200925/source/components/executer/exfldio.c
214d7a
@@ -681,8 +681,8 @@ AcpiExWriteWithUpdateRule (
214d7a
 
214d7a
             ACPI_ERROR ((AE_INFO,
214d7a
                 "Unknown UpdateRule value: 0x%X",
214d7a
-                (ObjDesc->CommonField.FieldFlags &
214d7a
-                    AML_FIELD_UPDATE_RULE_MASK)));
214d7a
+                (unsigned int) (ObjDesc->CommonField.FieldFlags &
214d7a
+                                   AML_FIELD_UPDATE_RULE_MASK)));
214d7a
             return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
214d7a
         }
214d7a
     }
214d7a
Index: acpica-unix2-20200925/source/components/executer/exnames.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/executer/exnames.c
214d7a
+++ acpica-unix2-20200925/source/components/executer/exnames.c
214d7a
@@ -237,7 +237,7 @@ AcpiExNameSegment (
214d7a
          */
214d7a
         ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
214d7a
             "Leading character is not alpha: %02Xh (not a name)\n",
214d7a
-            CharBuf[0]));
214d7a
+            (unsigned int) CharBuf[0]));
214d7a
         Status = AE_CTRL_PENDING;
214d7a
     }
214d7a
     else
214d7a
@@ -249,7 +249,7 @@ AcpiExNameSegment (
214d7a
         Status = AE_AML_BAD_NAME;
214d7a
         ACPI_ERROR ((AE_INFO,
214d7a
             "Bad character 0x%02x in name, at %p",
214d7a
-            *AmlAddress, AmlAddress));
214d7a
+            (unsigned int) (*AmlAddress), AmlAddress));
214d7a
     }
214d7a
 
214d7a
     *InAmlAddress = ACPI_CAST_PTR (UINT8, AmlAddress);
214d7a
Index: acpica-unix2-20200925/source/components/hardware/hwregs.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/hardware/hwregs.c
214d7a
+++ acpica-unix2-20200925/source/components/hardware/hwregs.c
214d7a
@@ -460,7 +460,7 @@ AcpiHwClearAcpiStatus (
214d7a
 
214d7a
 
214d7a
     ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %8.8X%8.8X\n",
214d7a
-        ACPI_BITMASK_ALL_FIXED_STATUS,
214d7a
+        (UINT32) ACPI_BITMASK_ALL_FIXED_STATUS,
214d7a
         ACPI_FORMAT_UINT64 (AcpiGbl_XPm1aStatus.Address)));
214d7a
 
214d7a
     LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
214d7a
Index: acpica-unix2-20200925/source/components/tables/tbfadt.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/tables/tbfadt.c
214d7a
+++ acpica-unix2-20200925/source/components/tables/tbfadt.c
214d7a
@@ -233,7 +233,7 @@ AcpiTbInitGenericAddress (
214d7a
         if (!(Flags & ACPI_FADT_GPE_REGISTER))
214d7a
         {
214d7a
             ACPI_ERROR ((AE_INFO,
214d7a
-                "%s - 32-bit FADT register is too long (%u bytes, %u bits) "
214d7a
+                "%s - 32-bit FADT register is too long (%u bytes, %d bits) "
214d7a
                 "to convert to GAS struct - 255 bits max, truncating",
214d7a
                 RegisterName, ByteWidth, (ByteWidth * 8)));
214d7a
         }
214d7a
@@ -303,7 +303,7 @@ AcpiTbSelectAddress (
214d7a
 
214d7a
         ACPI_BIOS_WARNING ((AE_INFO,
214d7a
             "32/64X %s address mismatch in FADT: "
214d7a
-            "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
214d7a
+            "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
214d7a
             RegisterName, Address32, ACPI_FORMAT_UINT64 (Address64),
214d7a
             AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
214d7a
 
214d7a
@@ -631,7 +631,7 @@ AcpiTbConvertFadt (
214d7a
 
214d7a
                     ACPI_BIOS_WARNING ((AE_INFO,
214d7a
                         "32/64X address mismatch in FADT/%s: "
214d7a
-                        "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
214d7a
+                        "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
214d7a
                         Name, Address32,
214d7a
                         ACPI_FORMAT_UINT64 (Address64->Address),
214d7a
                         AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
214d7a
Index: acpica-unix2-20200925/source/components/tables/tbxfroot.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/tables/tbxfroot.c
214d7a
+++ acpica-unix2-20200925/source/components/tables/tbxfroot.c
214d7a
@@ -177,7 +177,7 @@ AcpiFindRootPointer (
214d7a
     {
214d7a
         ACPI_ERROR ((AE_INFO,
214d7a
             "Could not map memory at 0x%8.8X for length %u",
214d7a
-            ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
214d7a
+            (UINT32) ACPI_EBDA_PTR_LOCATION, (UINT32) ACPI_EBDA_PTR_LENGTH));
214d7a
 
214d7a
         return_ACPI_STATUS (AE_NO_MEMORY);
214d7a
     }
214d7a
@@ -204,7 +204,7 @@ AcpiFindRootPointer (
214d7a
         {
214d7a
             ACPI_ERROR ((AE_INFO,
214d7a
                 "Could not map memory at 0x%8.8X for length %u",
214d7a
-                PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
214d7a
+                PhysicalAddress, (UINT32) ACPI_EBDA_WINDOW_SIZE));
214d7a
 
214d7a
             return_ACPI_STATUS (AE_NO_MEMORY);
214d7a
         }
214d7a
@@ -236,7 +236,7 @@ AcpiFindRootPointer (
214d7a
     {
214d7a
         ACPI_ERROR ((AE_INFO,
214d7a
             "Could not map memory at 0x%8.8X for length %u",
214d7a
-            ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
214d7a
+            (UINT32) ACPI_HI_RSDP_WINDOW_BASE, (UINT32) ACPI_HI_RSDP_WINDOW_SIZE));
214d7a
 
214d7a
         return_ACPI_STATUS (AE_NO_MEMORY);
214d7a
     }
214d7a
Index: acpica-unix2-20200925/source/components/utilities/utownerid.c
214d7a
===================================================================
214d7a
--- acpica-unix2-20200925.orig/source/components/utilities/utownerid.c
214d7a
+++ acpica-unix2-20200925/source/components/utilities/utownerid.c
214d7a
@@ -237,7 +237,7 @@ AcpiUtReleaseOwnerId (
214d7a
     else
214d7a
     {
214d7a
         ACPI_ERROR ((AE_INFO,
214d7a
-            "Attempted release of non-allocated OwnerId: 0x%3.3X", OwnerId + 1));
214d7a
+            "Release of non-allocated OwnerId: 0x%2.2X", (UINT32) OwnerId + 1));
214d7a
     }
214d7a
 
214d7a
     (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);