1 Use proper integer formatting
3 From: Al Stone <ahs3@redhat.com>
7 source/compiler/aslerror.c | 4 ++--
8 source/compiler/aslopt.c | 2 +-
9 source/compiler/aslprepkg.c | 2 +-
10 source/components/debugger/dbexec.c | 2 +-
11 source/components/dispatcher/dsmthdat.c | 4 ++--
12 source/components/dispatcher/dsutils.c | 2 +-
13 source/components/dispatcher/dswscope.c | 4 ++--
14 source/components/events/evgpe.c | 4 ++--
15 source/components/executer/exdump.c | 2 +-
16 source/components/executer/exfldio.c | 4 ++--
17 source/components/executer/exnames.c | 4 ++--
18 source/components/hardware/hwregs.c | 2 +-
19 source/components/tables/tbfadt.c | 6 +++---
20 source/components/tables/tbxfroot.c | 6 +++---
21 source/components/utilities/utownerid.c | 2 +-
22 18 files changed, 28 insertions(+), 28 deletions(-)
24 Index: acpica-unix2-20220331/source/compiler/aslerror.c
25 ===================================================================
26 --- acpica-unix2-20220331.orig/source/compiler/aslerror.c
27 +++ acpica-unix2-20220331/source/compiler/aslerror.c
28 @@ -917,7 +917,7 @@ AslLogNewError (
29 AslGbl_ExceptionCount[ModifiedLevel]++;
30 if (!AslGbl_IgnoreErrors && AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
32 - printf ("\nMaximum error count (%u) exceeded (aslerror.c)\n", ASL_MAX_ERROR_COUNT);
33 + printf ("\nMaximum error count (%d) exceeded (aslerror.c)\n", ASL_MAX_ERROR_COUNT);
35 AslGbl_SourceLine = 0;
36 AslGbl_NextError = AslGbl_ErrorLog;
37 Index: acpica-unix2-20220331/source/compiler/aslopt.c
38 ===================================================================
39 --- acpica-unix2-20220331.orig/source/compiler/aslopt.c
40 +++ acpica-unix2-20220331/source/compiler/aslopt.c
41 @@ -583,7 +583,7 @@ OptOptimizeNamePath (
44 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS,
45 - "PATH OPTIMIZE: Line %5d ParentOp [%12.12s] ThisOp [%12.12s] ",
46 + "PATH OPTIMIZE: Line %5u ParentOp [%12.12s] ThisOp [%12.12s] ",
47 Op->Asl.LogicalLineNumber,
48 AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode),
49 AcpiPsGetOpcodeName (Op->Common.AmlOpcode)));
50 Index: acpica-unix2-20220331/source/compiler/aslprepkg.c
51 ===================================================================
52 --- acpica-unix2-20220331.orig/source/compiler/aslprepkg.c
53 +++ acpica-unix2-20220331/source/compiler/aslprepkg.c
54 @@ -320,7 +320,7 @@ ApCheckPackage (
58 - sprintf (AslGbl_MsgBuffer, "%4.4s: Package length, %d, must be even.",
59 + sprintf (AslGbl_MsgBuffer, "%4.4s: Package length, %u, must be even.",
60 Predefined->Info.Name, Count);
62 AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH,
63 Index: acpica-unix2-20220331/source/components/debugger/dbexec.c
64 ===================================================================
65 --- acpica-unix2-20220331.orig/source/components/debugger/dbexec.c
66 +++ acpica-unix2-20220331/source/components/debugger/dbexec.c
67 @@ -231,7 +231,7 @@ AcpiDbExecuteMethod (
69 "Possible buffer overflow within AML Debugger "
70 "buffer (size 0x%X needed 0x%X)",
71 - ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
72 + (UINT32) ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
76 Index: acpica-unix2-20220331/source/components/dispatcher/dsmthdat.c
77 ===================================================================
78 --- acpica-unix2-20220331.orig/source/components/dispatcher/dsmthdat.c
79 +++ acpica-unix2-20220331/source/components/dispatcher/dsmthdat.c
80 @@ -291,7 +291,7 @@ AcpiDsMethodDataGetNode (
81 if (Index > ACPI_METHOD_MAX_LOCAL)
84 - "Local index %u is invalid (max %u)",
85 + "Local index %u is invalid (max %d)",
86 Index, ACPI_METHOD_MAX_LOCAL));
87 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
89 @@ -306,7 +306,7 @@ AcpiDsMethodDataGetNode (
90 if (Index > ACPI_METHOD_MAX_ARG)
93 - "Arg index %u is invalid (max %u)",
94 + "Arg index %u is invalid (max %d)",
95 Index, ACPI_METHOD_MAX_ARG));
96 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
98 Index: acpica-unix2-20220331/source/components/dispatcher/dsutils.c
99 ===================================================================
100 --- acpica-unix2-20220331.orig/source/components/dispatcher/dsutils.c
101 +++ acpica-unix2-20220331/source/components/dispatcher/dsutils.c
102 @@ -786,7 +786,7 @@ AcpiDsCreateOperands (
105 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
106 - "NumOperands %d, ArgCount %d, Index %d\n",
107 + "NumOperands %d, ArgCount %u, Index %u\n",
108 WalkState->NumOperands, ArgCount, Index));
110 /* Create the interpreter arguments, in reverse order */
111 Index: acpica-unix2-20220331/source/components/dispatcher/dswscope.c
112 ===================================================================
113 --- acpica-unix2-20220331.orig/source/components/dispatcher/dswscope.c
114 +++ acpica-unix2-20220331/source/components/dispatcher/dswscope.c
115 @@ -149,7 +149,7 @@ AcpiDsScopeStackPush (
116 WalkState->ScopeDepth++;
118 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
119 - "[%.2d] Pushed scope ", (UINT32) WalkState->ScopeDepth));
120 + "[%.2d] Pushed scope ", WalkState->ScopeDepth));
122 OldScopeInfo = WalkState->ScopeInfo;
124 @@ -211,7 +211,7 @@ AcpiDsScopeStackPop (
125 WalkState->ScopeDepth--;
127 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
128 - "[%.2d] Popped scope [%4.4s] (%s), New scope -> ",
129 + "[%.2u] Popped scope [%4.4s] (%s), New scope -> ",
130 (UINT32) WalkState->ScopeDepth,
131 AcpiUtGetNodeName (ScopeInfo->Scope.Node),
132 AcpiUtGetTypeName (ScopeInfo->Common.Value)));
133 Index: acpica-unix2-20220331/source/components/events/evgpe.c
134 ===================================================================
135 --- acpica-unix2-20220331.orig/source/components/events/evgpe.c
136 +++ acpica-unix2-20220331/source/components/events/evgpe.c
137 @@ -488,7 +488,7 @@ AcpiEvGpeDetect (
138 "Ignore disabled registers for GPE %02X-%02X: "
139 "RunEnable=%02X, WakeEnable=%02X\n",
140 GpeRegisterInfo->BaseGpeNumber,
141 - GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
142 + (unsigned int) (GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1)),
143 GpeRegisterInfo->EnableForRun,
144 GpeRegisterInfo->EnableForWake));
146 Index: acpica-unix2-20220331/source/components/executer/exdump.c
147 ===================================================================
148 --- acpica-unix2-20220331.orig/source/components/executer/exdump.c
149 +++ acpica-unix2-20220331/source/components/executer/exdump.c
150 @@ -678,7 +678,7 @@ AcpiExDumpOperand (
153 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p Refs=%u ",
154 - Depth, " ", Depth, ObjDesc, ObjDesc->Common.ReferenceCount));
155 + (int) Depth, " ", Depth, ObjDesc, ObjDesc->Common.ReferenceCount));
159 Index: acpica-unix2-20220331/source/components/executer/exfldio.c
160 ===================================================================
161 --- acpica-unix2-20220331.orig/source/components/executer/exfldio.c
162 +++ acpica-unix2-20220331/source/components/executer/exfldio.c
163 @@ -681,8 +681,8 @@ AcpiExWriteWithUpdateRule (
165 ACPI_ERROR ((AE_INFO,
166 "Unknown UpdateRule value: 0x%X",
167 - (ObjDesc->CommonField.FieldFlags &
168 - AML_FIELD_UPDATE_RULE_MASK)));
169 + (unsigned int) (ObjDesc->CommonField.FieldFlags &
170 + AML_FIELD_UPDATE_RULE_MASK)));
171 return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
174 Index: acpica-unix2-20220331/source/components/executer/exnames.c
175 ===================================================================
176 --- acpica-unix2-20220331.orig/source/components/executer/exnames.c
177 +++ acpica-unix2-20220331/source/components/executer/exnames.c
178 @@ -237,7 +237,7 @@ AcpiExNameSegment (
180 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
181 "Leading character is not alpha: %02Xh (not a name)\n",
183 + (unsigned int) CharBuf[0]));
184 Status = AE_CTRL_PENDING;
187 @@ -249,7 +249,7 @@ AcpiExNameSegment (
188 Status = AE_AML_BAD_NAME;
189 ACPI_ERROR ((AE_INFO,
190 "Bad character 0x%02x in name, at %p",
191 - *AmlAddress, AmlAddress));
192 + (unsigned int) (*AmlAddress), AmlAddress));
195 *InAmlAddress = ACPI_CAST_PTR (UINT8, AmlAddress);
196 Index: acpica-unix2-20220331/source/components/hardware/hwregs.c
197 ===================================================================
198 --- acpica-unix2-20220331.orig/source/components/hardware/hwregs.c
199 +++ acpica-unix2-20220331/source/components/hardware/hwregs.c
200 @@ -460,7 +460,7 @@ AcpiHwClearAcpiStatus (
203 ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %8.8X%8.8X\n",
204 - ACPI_BITMASK_ALL_FIXED_STATUS,
205 + (UINT32) ACPI_BITMASK_ALL_FIXED_STATUS,
206 ACPI_FORMAT_UINT64 (AcpiGbl_XPm1aStatus.Address)));
208 LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
209 Index: acpica-unix2-20220331/source/components/tables/tbfadt.c
210 ===================================================================
211 --- acpica-unix2-20220331.orig/source/components/tables/tbfadt.c
212 +++ acpica-unix2-20220331/source/components/tables/tbfadt.c
213 @@ -233,7 +233,7 @@ AcpiTbInitGenericAddress (
214 if (!(Flags & ACPI_FADT_GPE_REGISTER))
216 ACPI_ERROR ((AE_INFO,
217 - "%s - 32-bit FADT register is too long (%u bytes, %u bits) "
218 + "%s - 32-bit FADT register is too long (%u bytes, %d bits) "
219 "to convert to GAS struct - 255 bits max, truncating",
220 RegisterName, ByteWidth, (ByteWidth * 8)));
222 @@ -303,7 +303,7 @@ AcpiTbSelectAddress (
224 ACPI_BIOS_WARNING ((AE_INFO,
225 "32/64X %s address mismatch in FADT: "
226 - "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
227 + "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
228 RegisterName, Address32, ACPI_FORMAT_UINT64 (Address64),
229 AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
231 @@ -631,7 +631,7 @@ AcpiTbConvertFadt (
233 ACPI_BIOS_WARNING ((AE_INFO,
234 "32/64X address mismatch in FADT/%s: "
235 - "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
236 + "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
238 ACPI_FORMAT_UINT64 (Address64->Address),
239 AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
240 Index: acpica-unix2-20220331/source/components/tables/tbxfroot.c
241 ===================================================================
242 --- acpica-unix2-20220331.orig/source/components/tables/tbxfroot.c
243 +++ acpica-unix2-20220331/source/components/tables/tbxfroot.c
244 @@ -177,7 +177,7 @@ AcpiFindRootPointer (
246 ACPI_ERROR ((AE_INFO,
247 "Could not map memory at 0x%8.8X for length %u",
248 - ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
249 + (UINT32) ACPI_EBDA_PTR_LOCATION, (UINT32) ACPI_EBDA_PTR_LENGTH));
251 return_ACPI_STATUS (AE_NO_MEMORY);
253 @@ -204,7 +204,7 @@ AcpiFindRootPointer (
255 ACPI_ERROR ((AE_INFO,
256 "Could not map memory at 0x%8.8X for length %u",
257 - PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
258 + PhysicalAddress, (UINT32) ACPI_EBDA_WINDOW_SIZE));
260 return_ACPI_STATUS (AE_NO_MEMORY);
262 @@ -236,7 +236,7 @@ AcpiFindRootPointer (
264 ACPI_ERROR ((AE_INFO,
265 "Could not map memory at 0x%8.8X for length %u",
266 - ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
267 + (UINT32) ACPI_HI_RSDP_WINDOW_BASE, (UINT32) ACPI_HI_RSDP_WINDOW_SIZE));
269 return_ACPI_STATUS (AE_NO_MEMORY);
271 Index: acpica-unix2-20220331/source/components/utilities/utownerid.c
272 ===================================================================
273 --- acpica-unix2-20220331.orig/source/components/utilities/utownerid.c
274 +++ acpica-unix2-20220331/source/components/utilities/utownerid.c
275 @@ -237,7 +237,7 @@ AcpiUtReleaseOwnerId (
278 ACPI_ERROR ((AE_INFO,
279 - "Attempted release of non-allocated OwnerId: 0x%3.3X", OwnerId + 1));
280 + "Release of non-allocated OwnerId: 0x%2.2X", (UINT32) OwnerId + 1));
283 (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);