1 Use proper integer formatting
3 From: Al Stone <ahs3@redhat.com>
7 source/compiler/aslcompile.c | 2 +-
8 source/compiler/aslerror.c | 4 ++--
9 source/compiler/aslopt.c | 2 +-
10 source/compiler/aslpredef.c | 2 +-
11 source/compiler/aslprepkg.c | 2 +-
12 source/components/debugger/dbexec.c | 2 +-
13 source/components/dispatcher/dsmthdat.c | 4 ++--
14 source/components/dispatcher/dsutils.c | 2 +-
15 source/components/dispatcher/dswscope.c | 4 ++--
16 source/components/events/evgpe.c | 4 ++--
17 source/components/executer/exdump.c | 2 +-
18 source/components/executer/exfldio.c | 4 ++--
19 source/components/executer/exnames.c | 4 ++--
20 source/components/hardware/hwregs.c | 2 +-
21 source/components/tables/tbfadt.c | 6 +++---
22 source/components/tables/tbxfroot.c | 6 +++---
23 source/components/utilities/utownerid.c | 2 +-
24 source/tools/acpiexec/aemain.c | 2 +-
25 18 files changed, 28 insertions(+), 28 deletions(-)
27 Index: acpica-unix2-20170224/source/compiler/aslcompile.c
28 ===================================================================
29 --- acpica-unix2-20170224.orig/source/compiler/aslcompile.c
30 +++ acpica-unix2-20170224/source/compiler/aslcompile.c
31 @@ -750,7 +750,7 @@ CmCleanupAndExit (
33 if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
35 - printf ("\nMaximum error count (%u) exceeded\n",
36 + printf ("\nMaximum error count (%d) exceeded\n",
40 Index: acpica-unix2-20170224/source/compiler/aslerror.c
41 ===================================================================
42 --- acpica-unix2-20170224.orig/source/compiler/aslerror.c
43 +++ acpica-unix2-20170224/source/compiler/aslerror.c
44 @@ -687,7 +687,7 @@ AslCommonError (
45 Gbl_ExceptionCount[Level]++;
46 if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
48 - printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT);
49 + printf ("\nMaximum error count (%d) exceeded\n", ASL_MAX_ERROR_COUNT);
52 Gbl_NextError = Gbl_ErrorLog;
53 @@ -733,7 +733,7 @@ AslDisableException (
55 if (Gbl_DisabledMessagesIndex >= ASL_MAX_DISABLED_MESSAGES)
57 - printf ("Too many messages have been disabled (max %u)\n",
58 + printf ("Too many messages have been disabled (max %d)\n",
59 ASL_MAX_DISABLED_MESSAGES);
62 Index: acpica-unix2-20170224/source/compiler/aslopt.c
63 ===================================================================
64 --- acpica-unix2-20170224.orig/source/compiler/aslopt.c
65 +++ acpica-unix2-20170224/source/compiler/aslopt.c
66 @@ -584,7 +584,7 @@ OptOptimizeNamePath (
69 ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS,
70 - "PATH OPTIMIZE: Line %5d ParentOp [%12.12s] ThisOp [%12.12s] ",
71 + "PATH OPTIMIZE: Line %5u ParentOp [%12.12s] ThisOp [%12.12s] ",
72 Op->Asl.LogicalLineNumber,
73 AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode),
74 AcpiPsGetOpcodeName (Op->Common.AmlOpcode)));
75 Index: acpica-unix2-20170224/source/compiler/aslpredef.c
76 ===================================================================
77 --- acpica-unix2-20170224.orig/source/compiler/aslpredef.c
78 +++ acpica-unix2-20170224/source/compiler/aslpredef.c
79 @@ -114,7 +114,7 @@ ApCheckForPredefinedMethod (
81 if (MethodInfo->NumArguments != 0)
83 - sprintf (MsgBuffer, "%s requires %u", Op->Asl.ExternalName, 0);
84 + sprintf (MsgBuffer, "%s requires %d", Op->Asl.ExternalName, 0);
86 AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
88 Index: acpica-unix2-20170224/source/compiler/aslprepkg.c
89 ===================================================================
90 --- acpica-unix2-20170224.orig/source/compiler/aslprepkg.c
91 +++ acpica-unix2-20170224/source/compiler/aslprepkg.c
92 @@ -309,7 +309,7 @@ ApCheckPackage (
96 - sprintf (MsgBuffer, "%4.4s: Package length, %d, must be even.",
97 + sprintf (MsgBuffer, "%4.4s: Package length, %u, must be even.",
98 Predefined->Info.Name, Count);
100 AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH,
101 Index: acpica-unix2-20170224/source/components/debugger/dbexec.c
102 ===================================================================
103 --- acpica-unix2-20170224.orig/source/components/debugger/dbexec.c
104 +++ acpica-unix2-20170224/source/components/debugger/dbexec.c
105 @@ -214,7 +214,7 @@ AcpiDbExecuteMethod (
106 ACPI_ERROR ((AE_INFO,
107 "Possible overflow of internal debugger "
108 "buffer (size 0x%X needed 0x%X)",
109 - ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
110 + (UINT32) ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
114 Index: acpica-unix2-20170224/source/components/dispatcher/dsmthdat.c
115 ===================================================================
116 --- acpica-unix2-20170224.orig/source/components/dispatcher/dsmthdat.c
117 +++ acpica-unix2-20170224/source/components/dispatcher/dsmthdat.c
118 @@ -291,7 +291,7 @@ AcpiDsMethodDataGetNode (
119 if (Index > ACPI_METHOD_MAX_LOCAL)
121 ACPI_ERROR ((AE_INFO,
122 - "Local index %u is invalid (max %u)",
123 + "Local index %u is invalid (max %d)",
124 Index, ACPI_METHOD_MAX_LOCAL));
125 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
127 @@ -306,7 +306,7 @@ AcpiDsMethodDataGetNode (
128 if (Index > ACPI_METHOD_MAX_ARG)
130 ACPI_ERROR ((AE_INFO,
131 - "Arg index %u is invalid (max %u)",
132 + "Arg index %u is invalid (max %d)",
133 Index, ACPI_METHOD_MAX_ARG));
134 return_ACPI_STATUS (AE_AML_INVALID_INDEX);
136 Index: acpica-unix2-20170224/source/components/dispatcher/dsutils.c
137 ===================================================================
138 --- acpica-unix2-20170224.orig/source/components/dispatcher/dsutils.c
139 +++ acpica-unix2-20170224/source/components/dispatcher/dsutils.c
140 @@ -793,7 +793,7 @@ AcpiDsCreateOperands (
143 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
144 - "NumOperands %d, ArgCount %d, Index %d\n",
145 + "NumOperands %d, ArgCount %u, Index %u\n",
146 WalkState->NumOperands, ArgCount, Index));
148 /* Create the interpreter arguments, in reverse order */
149 Index: acpica-unix2-20170224/source/components/dispatcher/dswscope.c
150 ===================================================================
151 --- acpica-unix2-20170224.orig/source/components/dispatcher/dswscope.c
152 +++ acpica-unix2-20170224/source/components/dispatcher/dswscope.c
153 @@ -149,7 +149,7 @@ AcpiDsScopeStackPush (
154 WalkState->ScopeDepth++;
156 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
157 - "[%.2d] Pushed scope ", (UINT32) WalkState->ScopeDepth));
158 + "[%.2d] Pushed scope ", WalkState->ScopeDepth));
160 OldScopeInfo = WalkState->ScopeInfo;
162 @@ -212,7 +212,7 @@ AcpiDsScopeStackPop (
163 WalkState->ScopeDepth--;
165 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
166 - "[%.2d] Popped scope [%4.4s] (%s), New scope -> ",
167 + "[%.2u] Popped scope [%4.4s] (%s), New scope -> ",
168 (UINT32) WalkState->ScopeDepth,
169 AcpiUtGetNodeName (ScopeInfo->Scope.Node),
170 AcpiUtGetTypeName (ScopeInfo->Common.Value)));
171 Index: acpica-unix2-20170224/source/components/events/evgpe.c
172 ===================================================================
173 --- acpica-unix2-20170224.orig/source/components/events/evgpe.c
174 +++ acpica-unix2-20170224/source/components/events/evgpe.c
175 @@ -494,7 +494,7 @@ AcpiEvGpeDetect (
176 "Ignore disabled registers for GPE %02X-%02X: "
177 "RunEnable=%02X, WakeEnable=%02X\n",
178 GpeRegisterInfo->BaseGpeNumber,
179 - GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
180 + (unsigned int) (GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1)),
181 GpeRegisterInfo->EnableForRun,
182 GpeRegisterInfo->EnableForWake));
184 @@ -520,7 +520,7 @@ AcpiEvGpeDetect (
185 "Read registers for GPE %02X-%02X: Status=%02X, Enable=%02X, "
186 "RunEnable=%02X, WakeEnable=%02X\n",
187 GpeRegisterInfo->BaseGpeNumber,
188 - GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
189 + (unsigned int) (GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1)),
190 StatusReg, EnableReg,
191 GpeRegisterInfo->EnableForRun,
192 GpeRegisterInfo->EnableForWake));
193 Index: acpica-unix2-20170224/source/components/executer/exdump.c
194 ===================================================================
195 --- acpica-unix2-20170224.orig/source/components/executer/exdump.c
196 +++ acpica-unix2-20170224/source/components/executer/exdump.c
197 @@ -668,7 +668,7 @@ AcpiExDumpOperand (
200 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ",
201 - Depth, " ", Depth, ObjDesc));
202 + (int) Depth, " ", Depth, ObjDesc));
206 Index: acpica-unix2-20170224/source/components/executer/exfldio.c
207 ===================================================================
208 --- acpica-unix2-20170224.orig/source/components/executer/exfldio.c
209 +++ acpica-unix2-20170224/source/components/executer/exfldio.c
210 @@ -681,8 +681,8 @@ AcpiExWriteWithUpdateRule (
212 ACPI_ERROR ((AE_INFO,
213 "Unknown UpdateRule value: 0x%X",
214 - (ObjDesc->CommonField.FieldFlags &
215 - AML_FIELD_UPDATE_RULE_MASK)));
216 + (unsigned int) (ObjDesc->CommonField.FieldFlags &
217 + AML_FIELD_UPDATE_RULE_MASK)));
218 return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
221 Index: acpica-unix2-20170224/source/components/executer/exnames.c
222 ===================================================================
223 --- acpica-unix2-20170224.orig/source/components/executer/exnames.c
224 +++ acpica-unix2-20170224/source/components/executer/exnames.c
225 @@ -240,7 +240,7 @@ AcpiExNameSegment (
227 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
228 "Leading character is not alpha: %02Xh (not a name)\n",
230 + (unsigned int) CharBuf[0]));
231 Status = AE_CTRL_PENDING;
234 @@ -252,7 +252,7 @@ AcpiExNameSegment (
235 Status = AE_AML_BAD_NAME;
236 ACPI_ERROR ((AE_INFO,
237 "Bad character 0x%02x in name, at %p",
238 - *AmlAddress, AmlAddress));
239 + (unsigned int) (*AmlAddress), AmlAddress));
242 *InAmlAddress = ACPI_CAST_PTR (UINT8, AmlAddress);
243 Index: acpica-unix2-20170224/source/components/hardware/hwregs.c
244 ===================================================================
245 --- acpica-unix2-20170224.orig/source/components/hardware/hwregs.c
246 +++ acpica-unix2-20170224/source/components/hardware/hwregs.c
247 @@ -464,7 +464,7 @@ AcpiHwClearAcpiStatus (
250 ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %8.8X%8.8X\n",
251 - ACPI_BITMASK_ALL_FIXED_STATUS,
252 + (UINT32) ACPI_BITMASK_ALL_FIXED_STATUS,
253 ACPI_FORMAT_UINT64 (AcpiGbl_XPm1aStatus.Address)));
255 LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
256 Index: acpica-unix2-20170224/source/components/tables/tbfadt.c
257 ===================================================================
258 --- acpica-unix2-20170224.orig/source/components/tables/tbfadt.c
259 +++ acpica-unix2-20170224/source/components/tables/tbfadt.c
260 @@ -233,7 +233,7 @@ AcpiTbInitGenericAddress (
261 if (!(Flags & ACPI_FADT_GPE_REGISTER))
263 ACPI_ERROR ((AE_INFO,
264 - "%s - 32-bit FADT register is too long (%u bytes, %u bits) "
265 + "%s - 32-bit FADT register is too long (%u bytes, %d bits) "
266 "to convert to GAS struct - 255 bits max, truncating",
267 RegisterName, ByteWidth, (ByteWidth * 8)));
269 @@ -304,7 +304,7 @@ AcpiTbSelectAddress (
271 ACPI_BIOS_WARNING ((AE_INFO,
272 "32/64X %s address mismatch in FADT: "
273 - "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
274 + "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
275 RegisterName, Address32, ACPI_FORMAT_UINT64 (Address64),
276 AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
278 @@ -620,7 +620,7 @@ AcpiTbConvertFadt (
280 ACPI_BIOS_WARNING ((AE_INFO,
281 "32/64X address mismatch in FADT/%s: "
282 - "0x%8.8X/0x%8.8X%8.8X, using %u-bit address",
283 + "0x%8.8X/0x%8.8X%8.8X, using %d-bit address",
285 ACPI_FORMAT_UINT64 (Address64->Address),
286 AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
287 Index: acpica-unix2-20170224/source/components/tables/tbxfroot.c
288 ===================================================================
289 --- acpica-unix2-20170224.orig/source/components/tables/tbxfroot.c
290 +++ acpica-unix2-20170224/source/components/tables/tbxfroot.c
291 @@ -177,7 +177,7 @@ AcpiFindRootPointer (
293 ACPI_ERROR ((AE_INFO,
294 "Could not map memory at 0x%8.8X for length %u",
295 - ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
296 + (UINT32) ACPI_EBDA_PTR_LOCATION, (UINT32) ACPI_EBDA_PTR_LENGTH));
298 return_ACPI_STATUS (AE_NO_MEMORY);
300 @@ -204,7 +204,7 @@ AcpiFindRootPointer (
302 ACPI_ERROR ((AE_INFO,
303 "Could not map memory at 0x%8.8X for length %u",
304 - PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
305 + PhysicalAddress, (UINT32) ACPI_EBDA_WINDOW_SIZE));
307 return_ACPI_STATUS (AE_NO_MEMORY);
309 @@ -236,7 +236,7 @@ AcpiFindRootPointer (
311 ACPI_ERROR ((AE_INFO,
312 "Could not map memory at 0x%8.8X for length %u",
313 - ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
314 + (UINT32) ACPI_HI_RSDP_WINDOW_BASE, (UINT32) ACPI_HI_RSDP_WINDOW_SIZE));
316 return_ACPI_STATUS (AE_NO_MEMORY);
318 Index: acpica-unix2-20170224/source/components/utilities/utownerid.c
319 ===================================================================
320 --- acpica-unix2-20170224.orig/source/components/utilities/utownerid.c
321 +++ acpica-unix2-20170224/source/components/utilities/utownerid.c
322 @@ -231,7 +231,7 @@ AcpiUtReleaseOwnerId (
325 ACPI_ERROR ((AE_INFO,
326 - "Release of non-allocated OwnerId: 0x%2.2X", OwnerId + 1));
327 + "Release of non-allocated OwnerId: 0x%2.2X", (UINT32) OwnerId + 1));
330 (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);
331 Index: acpica-unix2-20170224/source/tools/acpiexec/aemain.c
332 ===================================================================
333 --- acpica-unix2-20170224.orig/source/tools/acpiexec/aemain.c
334 +++ acpica-unix2-20170224/source/tools/acpiexec/aemain.c
335 @@ -203,7 +203,7 @@ AeDoOptions (
337 if (strlen (AcpiGbl_Optarg) > (AE_BUFFER_SIZE -1))
339 - printf ("**** The length of command line (%u) exceeded maximum (%u)\n",
340 + printf ("**** The length of command line (%u) exceeded maximum (%d)\n",
341 (UINT32) strlen (AcpiGbl_Optarg), (AE_BUFFER_SIZE -1));