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