0fb27e
Use proper integer formatting
0fb27e
0fb27e
From: Al Stone <ahs3@redhat.com>
0fb27e
0fb27e
0fb27e
---
0fb27e
 source/compiler/aslcompile.c            |    2 +-
0fb27e
 source/compiler/aslerror.c              |    4 ++--
0fb27e
 source/compiler/aslopt.c                |    2 +-
0fb27e
 source/compiler/aslpredef.c             |    2 +-
0fb27e
 source/compiler/aslprepkg.c             |    2 +-
0fb27e
 source/components/debugger/dbexec.c     |    2 +-
0fb27e
 source/components/dispatcher/dsmthdat.c |    4 ++--
0fb27e
 source/components/dispatcher/dsutils.c  |    2 +-
0fb27e
 source/components/dispatcher/dswscope.c |    4 ++--
0fb27e
 source/components/events/evgpe.c        |    4 ++--
0fb27e
 source/components/executer/exdump.c     |    2 +-
0fb27e
 source/components/executer/exfldio.c    |    4 ++--
0fb27e
 source/components/executer/exnames.c    |    4 ++--
0fb27e
 source/components/hardware/hwregs.c     |    2 +-
0fb27e
 source/components/tables/tbfadt.c       |    6 +++---
0fb27e
 source/components/tables/tbxfroot.c     |    6 +++---
0fb27e
 source/components/utilities/utownerid.c |    2 +-
0fb27e
 source/tools/acpiexec/aemain.c          |    2 +-
0fb27e
 18 files changed, 28 insertions(+), 28 deletions(-)
0fb27e
0fb27e
Index: acpica-unix2-20180531/source/compiler/aslcompile.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/compiler/aslcompile.c
0fb27e
+++ acpica-unix2-20180531/source/compiler/aslcompile.c
0fb27e
@@ -750,7 +750,7 @@ CmCleanupAndExit (
0fb27e
 
0fb27e
     if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
0fb27e
     {
0fb27e
-        printf ("\nMaximum error count (%u) exceeded\n",
0fb27e
+        printf ("\nMaximum error count (%d) exceeded\n",
0fb27e
             ASL_MAX_ERROR_COUNT);
0fb27e
     }
0fb27e
 
0fb27e
Index: acpica-unix2-20180531/source/compiler/aslerror.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/compiler/aslerror.c
0fb27e
+++ acpica-unix2-20180531/source/compiler/aslerror.c
0fb27e
@@ -880,7 +880,7 @@ AslLogNewError (
0fb27e
     Gbl_ExceptionCount[Level]++;
0fb27e
     if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
0fb27e
     {
0fb27e
-        printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT);
0fb27e
+        printf ("\nMaximum error count (%d) exceeded\n", ASL_MAX_ERROR_COUNT);
0fb27e
 
0fb27e
         Gbl_SourceLine = 0;
0fb27e
         Gbl_NextError = Gbl_ErrorLog;
0fb27e
@@ -1036,7 +1036,7 @@ AslDisableException (
0fb27e
 
0fb27e
     if (Gbl_DisabledMessagesIndex >= ASL_MAX_DISABLED_MESSAGES)
0fb27e
     {
0fb27e
-        printf ("Too many messages have been disabled (max %u)\n",
0fb27e
+        printf ("Too many messages have been disabled (max %d)\n",
0fb27e
             ASL_MAX_DISABLED_MESSAGES);
0fb27e
         return (AE_LIMIT);
0fb27e
     }
0fb27e
Index: acpica-unix2-20180531/source/compiler/aslopt.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/compiler/aslopt.c
0fb27e
+++ acpica-unix2-20180531/source/compiler/aslopt.c
0fb27e
@@ -584,7 +584,7 @@ OptOptimizeNamePath (
0fb27e
     }
0fb27e
 
0fb27e
     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS,
0fb27e
-        "PATH OPTIMIZE: Line %5d ParentOp [%12.12s] ThisOp [%12.12s] ",
0fb27e
+        "PATH OPTIMIZE: Line %5u ParentOp [%12.12s] ThisOp [%12.12s] ",
0fb27e
         Op->Asl.LogicalLineNumber,
0fb27e
         AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode),
0fb27e
         AcpiPsGetOpcodeName (Op->Common.AmlOpcode)));
0fb27e
Index: acpica-unix2-20180531/source/compiler/aslpredef.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/compiler/aslpredef.c
0fb27e
+++ acpica-unix2-20180531/source/compiler/aslpredef.c
0fb27e
@@ -114,7 +114,7 @@ ApCheckForPredefinedMethod (
0fb27e
 
0fb27e
         if (MethodInfo->NumArguments != 0)
0fb27e
         {
0fb27e
-            sprintf (MsgBuffer, "%s requires %u", Op->Asl.ExternalName, 0);
0fb27e
+            sprintf (MsgBuffer, "%s requires %d", Op->Asl.ExternalName, 0);
0fb27e
 
0fb27e
             AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
0fb27e
                 MsgBuffer);
0fb27e
Index: acpica-unix2-20180531/source/compiler/aslprepkg.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/compiler/aslprepkg.c
0fb27e
+++ acpica-unix2-20180531/source/compiler/aslprepkg.c
0fb27e
@@ -309,7 +309,7 @@ ApCheckPackage (
0fb27e
 
0fb27e
         if (Count & 1)
0fb27e
         {
0fb27e
-            sprintf (MsgBuffer, "%4.4s: Package length, %d, must be even.",
0fb27e
+            sprintf (MsgBuffer, "%4.4s: Package length, %u, must be even.",
0fb27e
                 Predefined->Info.Name, Count);
0fb27e
 
0fb27e
             AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH,
0fb27e
Index: acpica-unix2-20180531/source/components/debugger/dbexec.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/debugger/dbexec.c
0fb27e
+++ acpica-unix2-20180531/source/components/debugger/dbexec.c
0fb27e
@@ -230,7 +230,7 @@ AcpiDbExecuteMethod (
0fb27e
             ACPI_ERROR ((AE_INFO,
0fb27e
                 "Possible overflow of internal debugger "
0fb27e
                 "buffer (size 0x%X needed 0x%X)",
0fb27e
-                ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
0fb27e
+                (UINT32) ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
0fb27e
         }
0fb27e
     }
0fb27e
 
0fb27e
Index: acpica-unix2-20180531/source/components/dispatcher/dsmthdat.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/dispatcher/dsmthdat.c
0fb27e
+++ acpica-unix2-20180531/source/components/dispatcher/dsmthdat.c
0fb27e
@@ -291,7 +291,7 @@ AcpiDsMethodDataGetNode (
0fb27e
         if (Index > ACPI_METHOD_MAX_LOCAL)
0fb27e
         {
0fb27e
             ACPI_ERROR ((AE_INFO,
0fb27e
-                "Local index %u is invalid (max %u)",
0fb27e
+                "Local index %u is invalid (max %d)",
0fb27e
                 Index, ACPI_METHOD_MAX_LOCAL));
0fb27e
             return_ACPI_STATUS (AE_AML_INVALID_INDEX);
0fb27e
         }
0fb27e
@@ -306,7 +306,7 @@ AcpiDsMethodDataGetNode (
0fb27e
         if (Index > ACPI_METHOD_MAX_ARG)
0fb27e
         {
0fb27e
             ACPI_ERROR ((AE_INFO,
0fb27e
-                "Arg index %u is invalid (max %u)",
0fb27e
+                "Arg index %u is invalid (max %d)",
0fb27e
                 Index, ACPI_METHOD_MAX_ARG));
0fb27e
             return_ACPI_STATUS (AE_AML_INVALID_INDEX);
0fb27e
         }
0fb27e
Index: acpica-unix2-20180531/source/components/dispatcher/dsutils.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/dispatcher/dsutils.c
0fb27e
+++ acpica-unix2-20180531/source/components/dispatcher/dsutils.c
0fb27e
@@ -788,7 +788,7 @@ AcpiDsCreateOperands (
0fb27e
     }
0fb27e
 
0fb27e
     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
0fb27e
-        "NumOperands %d, ArgCount %d, Index %d\n",
0fb27e
+        "NumOperands %d, ArgCount %u, Index %u\n",
0fb27e
         WalkState->NumOperands, ArgCount, Index));
0fb27e
 
0fb27e
     /* Create the interpreter arguments, in reverse order */
0fb27e
Index: acpica-unix2-20180531/source/components/dispatcher/dswscope.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/dispatcher/dswscope.c
0fb27e
+++ acpica-unix2-20180531/source/components/dispatcher/dswscope.c
0fb27e
@@ -149,7 +149,7 @@ AcpiDsScopeStackPush (
0fb27e
     WalkState->ScopeDepth++;
0fb27e
 
0fb27e
     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
0fb27e
-        "[%.2d] Pushed scope ", (UINT32) WalkState->ScopeDepth));
0fb27e
+        "[%.2d] Pushed scope ", WalkState->ScopeDepth));
0fb27e
 
0fb27e
     OldScopeInfo = WalkState->ScopeInfo;
0fb27e
     if (OldScopeInfo)
0fb27e
@@ -211,7 +211,7 @@ AcpiDsScopeStackPop (
0fb27e
     WalkState->ScopeDepth--;
0fb27e
 
0fb27e
     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
0fb27e
-        "[%.2d] Popped scope [%4.4s] (%s), New scope -> ",
0fb27e
+        "[%.2u] Popped scope [%4.4s] (%s), New scope -> ",
0fb27e
         (UINT32) WalkState->ScopeDepth,
0fb27e
         AcpiUtGetNodeName (ScopeInfo->Scope.Node),
0fb27e
         AcpiUtGetTypeName (ScopeInfo->Common.Value)));
0fb27e
Index: acpica-unix2-20180531/source/components/events/evgpe.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/events/evgpe.c
0fb27e
+++ acpica-unix2-20180531/source/components/events/evgpe.c
0fb27e
@@ -481,7 +481,7 @@ AcpiEvGpeDetect (
0fb27e
                     "Ignore disabled registers for GPE %02X-%02X: "
0fb27e
                     "RunEnable=%02X, WakeEnable=%02X\n",
0fb27e
                     GpeRegisterInfo->BaseGpeNumber,
0fb27e
-                    GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
0fb27e
+                    (unsigned int) (GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1)),
0fb27e
                     GpeRegisterInfo->EnableForRun,
0fb27e
                     GpeRegisterInfo->EnableForWake));
0fb27e
                 continue;
0fb27e
Index: acpica-unix2-20180531/source/components/executer/exdump.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/executer/exdump.c
0fb27e
+++ acpica-unix2-20180531/source/components/executer/exdump.c
0fb27e
@@ -678,7 +678,7 @@ AcpiExDumpOperand (
0fb27e
     if (Depth > 0)
0fb27e
     {
0fb27e
         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p Refs=%u ",
0fb27e
-            Depth, " ", Depth, ObjDesc, ObjDesc->Common.ReferenceCount));
0fb27e
+            (int) Depth, " ", Depth, ObjDesc, ObjDesc->Common.ReferenceCount));
0fb27e
     }
0fb27e
     else
0fb27e
     {
0fb27e
Index: acpica-unix2-20180531/source/components/executer/exfldio.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/executer/exfldio.c
0fb27e
+++ acpica-unix2-20180531/source/components/executer/exfldio.c
0fb27e
@@ -681,8 +681,8 @@ AcpiExWriteWithUpdateRule (
0fb27e
 
0fb27e
             ACPI_ERROR ((AE_INFO,
0fb27e
                 "Unknown UpdateRule value: 0x%X",
0fb27e
-                (ObjDesc->CommonField.FieldFlags &
0fb27e
-                    AML_FIELD_UPDATE_RULE_MASK)));
0fb27e
+                (unsigned int) (ObjDesc->CommonField.FieldFlags &
0fb27e
+                                   AML_FIELD_UPDATE_RULE_MASK)));
0fb27e
             return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
0fb27e
         }
0fb27e
     }
0fb27e
Index: acpica-unix2-20180531/source/components/executer/exnames.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/executer/exnames.c
0fb27e
+++ acpica-unix2-20180531/source/components/executer/exnames.c
0fb27e
@@ -237,7 +237,7 @@ AcpiExNameSegment (
0fb27e
          */
0fb27e
         ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
0fb27e
             "Leading character is not alpha: %02Xh (not a name)\n",
0fb27e
-            CharBuf[0]));
0fb27e
+            (unsigned int) CharBuf[0]));
0fb27e
         Status = AE_CTRL_PENDING;
0fb27e
     }
0fb27e
     else
0fb27e
@@ -249,7 +249,7 @@ AcpiExNameSegment (
0fb27e
         Status = AE_AML_BAD_NAME;
0fb27e
         ACPI_ERROR ((AE_INFO,
0fb27e
             "Bad character 0x%02x in name, at %p",
0fb27e
-            *AmlAddress, AmlAddress));
0fb27e
+            (unsigned int) (*AmlAddress), AmlAddress));
0fb27e
     }
0fb27e
 
0fb27e
     *InAmlAddress = ACPI_CAST_PTR (UINT8, AmlAddress);
0fb27e
Index: acpica-unix2-20180531/source/components/hardware/hwregs.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/hardware/hwregs.c
0fb27e
+++ acpica-unix2-20180531/source/components/hardware/hwregs.c
0fb27e
@@ -460,7 +460,7 @@ AcpiHwClearAcpiStatus (
0fb27e
 
0fb27e
 
0fb27e
     ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %8.8X%8.8X\n",
0fb27e
-        ACPI_BITMASK_ALL_FIXED_STATUS,
0fb27e
+        (UINT32) ACPI_BITMASK_ALL_FIXED_STATUS,
0fb27e
         ACPI_FORMAT_UINT64 (AcpiGbl_XPm1aStatus.Address)));
0fb27e
 
0fb27e
     LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
0fb27e
Index: acpica-unix2-20180531/source/components/tables/tbfadt.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/tables/tbfadt.c
0fb27e
+++ acpica-unix2-20180531/source/components/tables/tbfadt.c
0fb27e
@@ -233,7 +233,7 @@ AcpiTbInitGenericAddress (
0fb27e
         if (!(Flags & ACPI_FADT_GPE_REGISTER))
0fb27e
         {
0fb27e
             ACPI_ERROR ((AE_INFO,
0fb27e
-                "%s - 32-bit FADT register is too long (%u bytes, %u bits) "
0fb27e
+                "%s - 32-bit FADT register is too long (%u bytes, %d bits) "
0fb27e
                 "to convert to GAS struct - 255 bits max, truncating",
0fb27e
                 RegisterName, ByteWidth, (ByteWidth * 8)));
0fb27e
         }
0fb27e
@@ -304,7 +304,7 @@ AcpiTbSelectAddress (
0fb27e
 
0fb27e
         ACPI_BIOS_WARNING ((AE_INFO,
0fb27e
             "32/64X %s address mismatch in FADT: "
0fb27e
-            "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
0fb27e
+            "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
0fb27e
             RegisterName, Address32, ACPI_FORMAT_UINT64 (Address64),
0fb27e
             AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
0fb27e
 
0fb27e
@@ -628,7 +628,7 @@ AcpiTbConvertFadt (
0fb27e
 
0fb27e
                     ACPI_BIOS_WARNING ((AE_INFO,
0fb27e
                         "32/64X address mismatch in FADT/%s: "
0fb27e
-                        "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
0fb27e
+                        "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
0fb27e
                         Name, Address32,
0fb27e
                         ACPI_FORMAT_UINT64 (Address64->Address),
0fb27e
                         AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
0fb27e
Index: acpica-unix2-20180531/source/components/tables/tbxfroot.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/tables/tbxfroot.c
0fb27e
+++ acpica-unix2-20180531/source/components/tables/tbxfroot.c
0fb27e
@@ -177,7 +177,7 @@ AcpiFindRootPointer (
0fb27e
     {
0fb27e
         ACPI_ERROR ((AE_INFO,
0fb27e
             "Could not map memory at 0x%8.8X for length %u",
0fb27e
-            ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
0fb27e
+            (UINT32) ACPI_EBDA_PTR_LOCATION, (UINT32) ACPI_EBDA_PTR_LENGTH));
0fb27e
 
0fb27e
         return_ACPI_STATUS (AE_NO_MEMORY);
0fb27e
     }
0fb27e
@@ -204,7 +204,7 @@ AcpiFindRootPointer (
0fb27e
         {
0fb27e
             ACPI_ERROR ((AE_INFO,
0fb27e
                 "Could not map memory at 0x%8.8X for length %u",
0fb27e
-                PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
0fb27e
+                PhysicalAddress, (UINT32) ACPI_EBDA_WINDOW_SIZE));
0fb27e
 
0fb27e
             return_ACPI_STATUS (AE_NO_MEMORY);
0fb27e
         }
0fb27e
@@ -236,7 +236,7 @@ AcpiFindRootPointer (
0fb27e
     {
0fb27e
         ACPI_ERROR ((AE_INFO,
0fb27e
             "Could not map memory at 0x%8.8X for length %u",
0fb27e
-            ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
0fb27e
+            (UINT32) ACPI_HI_RSDP_WINDOW_BASE, (UINT32) ACPI_HI_RSDP_WINDOW_SIZE));
0fb27e
 
0fb27e
         return_ACPI_STATUS (AE_NO_MEMORY);
0fb27e
     }
0fb27e
Index: acpica-unix2-20180531/source/components/utilities/utownerid.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/components/utilities/utownerid.c
0fb27e
+++ acpica-unix2-20180531/source/components/utilities/utownerid.c
0fb27e
@@ -237,7 +237,7 @@ AcpiUtReleaseOwnerId (
0fb27e
     else
0fb27e
     {
0fb27e
         ACPI_ERROR ((AE_INFO,
0fb27e
-            "Release of non-allocated OwnerId: 0x%2.2X", OwnerId + 1));
0fb27e
+            "Release of non-allocated OwnerId: 0x%2.2X", (UINT32) OwnerId + 1));
0fb27e
     }
0fb27e
 
0fb27e
     (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);
0fb27e
Index: acpica-unix2-20180531/source/tools/acpiexec/aemain.c
0fb27e
===================================================================
0fb27e
--- acpica-unix2-20180531.orig/source/tools/acpiexec/aemain.c
0fb27e
+++ acpica-unix2-20180531/source/tools/acpiexec/aemain.c
0fb27e
@@ -209,7 +209,7 @@ AeDoOptions (
0fb27e
 
0fb27e
         if (strlen (AcpiGbl_Optarg) > (AE_BUFFER_SIZE -1))
0fb27e
         {
0fb27e
-            printf ("**** The length of command line (%u) exceeded maximum (%u)\n",
0fb27e
+            printf ("**** The length of command line (%u) exceeded maximum (%d)\n",
0fb27e
                 (UINT32) strlen (AcpiGbl_Optarg), (AE_BUFFER_SIZE -1));
0fb27e
             return (-1);
0fb27e
         }