]> git.pld-linux.org Git - packages/acpica.git/blame - int-format.patch
- updated tests
[packages/acpica.git] / int-format.patch
CommitLineData
77760c90
JB
1Use proper integer formatting
2
3From: Al Stone <ahs3@redhat.com>
4
5
6---
77760c90
JB
7 source/compiler/aslerror.c | 4 ++--
8 source/compiler/aslopt.c | 2 +-
77760c90
JB
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 +-
77760c90
JB
22 18 files changed, 28 insertions(+), 28 deletions(-)
23
b643ab7e 24Index: acpica-unix2-20220331/source/compiler/aslerror.c
77760c90 25===================================================================
b643ab7e
JB
26--- acpica-unix2-20220331.orig/source/compiler/aslerror.c
27+++ acpica-unix2-20220331/source/compiler/aslerror.c
70586bb3
JB
28@@ -917,7 +917,7 @@ AslLogNewError (
29 AslGbl_ExceptionCount[ModifiedLevel]++;
30 if (!AslGbl_IgnoreErrors && AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
77760c90 31 {
b643ab7e
JB
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);
77760c90 34
25d7dd99
JB
35 AslGbl_SourceLine = 0;
36 AslGbl_NextError = AslGbl_ErrorLog;
b643ab7e 37Index: acpica-unix2-20220331/source/compiler/aslopt.c
77760c90 38===================================================================
b643ab7e
JB
39--- acpica-unix2-20220331.orig/source/compiler/aslopt.c
40+++ acpica-unix2-20220331/source/compiler/aslopt.c
25d7dd99 41@@ -583,7 +583,7 @@ OptOptimizeNamePath (
77760c90
JB
42 }
43
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)));
b643ab7e 50Index: acpica-unix2-20220331/source/compiler/aslprepkg.c
77760c90 51===================================================================
b643ab7e
JB
52--- acpica-unix2-20220331.orig/source/compiler/aslprepkg.c
53+++ acpica-unix2-20220331/source/compiler/aslprepkg.c
54@@ -320,7 +320,7 @@ ApCheckPackage (
70586bb3
JB
55
56 if (Count & 1)
57 {
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);
61
62 AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH,
b643ab7e 63Index: acpica-unix2-20220331/source/components/debugger/dbexec.c
70586bb3 64===================================================================
b643ab7e
JB
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 (
77760c90 68 ACPI_ERROR ((AE_INFO,
70586bb3 69 "Possible buffer overflow within AML Debugger "
77760c90
JB
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));
73 }
74 }
75
b643ab7e 76Index: acpica-unix2-20220331/source/components/dispatcher/dsmthdat.c
77760c90 77===================================================================
b643ab7e
JB
78--- acpica-unix2-20220331.orig/source/components/dispatcher/dsmthdat.c
79+++ acpica-unix2-20220331/source/components/dispatcher/dsmthdat.c
77760c90
JB
80@@ -291,7 +291,7 @@ AcpiDsMethodDataGetNode (
81 if (Index > ACPI_METHOD_MAX_LOCAL)
82 {
83 ACPI_ERROR ((AE_INFO,
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);
88 }
89@@ -306,7 +306,7 @@ AcpiDsMethodDataGetNode (
90 if (Index > ACPI_METHOD_MAX_ARG)
91 {
92 ACPI_ERROR ((AE_INFO,
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);
97 }
b643ab7e 98Index: acpica-unix2-20220331/source/components/dispatcher/dsutils.c
77760c90 99===================================================================
b643ab7e
JB
100--- acpica-unix2-20220331.orig/source/components/dispatcher/dsutils.c
101+++ acpica-unix2-20220331/source/components/dispatcher/dsutils.c
70586bb3 102@@ -786,7 +786,7 @@ AcpiDsCreateOperands (
77760c90
JB
103 }
104
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));
109
110 /* Create the interpreter arguments, in reverse order */
b643ab7e 111Index: acpica-unix2-20220331/source/components/dispatcher/dswscope.c
77760c90 112===================================================================
b643ab7e
JB
113--- acpica-unix2-20220331.orig/source/components/dispatcher/dswscope.c
114+++ acpica-unix2-20220331/source/components/dispatcher/dswscope.c
77760c90
JB
115@@ -149,7 +149,7 @@ AcpiDsScopeStackPush (
116 WalkState->ScopeDepth++;
117
118 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
119- "[%.2d] Pushed scope ", (UINT32) WalkState->ScopeDepth));
120+ "[%.2d] Pushed scope ", WalkState->ScopeDepth));
121
122 OldScopeInfo = WalkState->ScopeInfo;
123 if (OldScopeInfo)
25d7dd99 124@@ -211,7 +211,7 @@ AcpiDsScopeStackPop (
77760c90
JB
125 WalkState->ScopeDepth--;
126
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)));
b643ab7e 133Index: acpica-unix2-20220331/source/components/events/evgpe.c
77760c90 134===================================================================
b643ab7e
JB
135--- acpica-unix2-20220331.orig/source/components/events/evgpe.c
136+++ acpica-unix2-20220331/source/components/events/evgpe.c
70586bb3 137@@ -488,7 +488,7 @@ AcpiEvGpeDetect (
77760c90
JB
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));
145 continue;
b643ab7e 146Index: acpica-unix2-20220331/source/components/executer/exdump.c
77760c90 147===================================================================
b643ab7e
JB
148--- acpica-unix2-20220331.orig/source/components/executer/exdump.c
149+++ acpica-unix2-20220331/source/components/executer/exdump.c
25d7dd99 150@@ -678,7 +678,7 @@ AcpiExDumpOperand (
77760c90
JB
151 if (Depth > 0)
152 {
25d7dd99
JB
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));
77760c90
JB
156 }
157 else
158 {
b643ab7e 159Index: acpica-unix2-20220331/source/components/executer/exfldio.c
77760c90 160===================================================================
b643ab7e
JB
161--- acpica-unix2-20220331.orig/source/components/executer/exfldio.c
162+++ acpica-unix2-20220331/source/components/executer/exfldio.c
77760c90
JB
163@@ -681,8 +681,8 @@ AcpiExWriteWithUpdateRule (
164
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);
172 }
173 }
b643ab7e 174Index: acpica-unix2-20220331/source/components/executer/exnames.c
77760c90 175===================================================================
b643ab7e
JB
176--- acpica-unix2-20220331.orig/source/components/executer/exnames.c
177+++ acpica-unix2-20220331/source/components/executer/exnames.c
25d7dd99 178@@ -237,7 +237,7 @@ AcpiExNameSegment (
77760c90
JB
179 */
180 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
181 "Leading character is not alpha: %02Xh (not a name)\n",
182- CharBuf[0]));
183+ (unsigned int) CharBuf[0]));
184 Status = AE_CTRL_PENDING;
185 }
186 else
25d7dd99 187@@ -249,7 +249,7 @@ AcpiExNameSegment (
77760c90
JB
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));
193 }
194
195 *InAmlAddress = ACPI_CAST_PTR (UINT8, AmlAddress);
b643ab7e 196Index: acpica-unix2-20220331/source/components/hardware/hwregs.c
77760c90 197===================================================================
b643ab7e
JB
198--- acpica-unix2-20220331.orig/source/components/hardware/hwregs.c
199+++ acpica-unix2-20220331/source/components/hardware/hwregs.c
25d7dd99 200@@ -460,7 +460,7 @@ AcpiHwClearAcpiStatus (
77760c90
JB
201
202
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)));
207
208 LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
b643ab7e 209Index: acpica-unix2-20220331/source/components/tables/tbfadt.c
77760c90 210===================================================================
b643ab7e
JB
211--- acpica-unix2-20220331.orig/source/components/tables/tbfadt.c
212+++ acpica-unix2-20220331/source/components/tables/tbfadt.c
77760c90
JB
213@@ -233,7 +233,7 @@ AcpiTbInitGenericAddress (
214 if (!(Flags & ACPI_FADT_GPE_REGISTER))
215 {
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)));
221 }
b643ab7e 222@@ -303,7 +303,7 @@ AcpiTbSelectAddress (
77760c90
JB
223
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));
230
b643ab7e 231@@ -631,7 +631,7 @@ AcpiTbConvertFadt (
77760c90
JB
232
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",
237 Name, Address32,
238 ACPI_FORMAT_UINT64 (Address64->Address),
239 AcpiGbl_Use32BitFadtAddresses ? 32 : 64));
b643ab7e 240Index: acpica-unix2-20220331/source/components/tables/tbxfroot.c
77760c90 241===================================================================
b643ab7e
JB
242--- acpica-unix2-20220331.orig/source/components/tables/tbxfroot.c
243+++ acpica-unix2-20220331/source/components/tables/tbxfroot.c
77760c90
JB
244@@ -177,7 +177,7 @@ AcpiFindRootPointer (
245 {
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));
250
251 return_ACPI_STATUS (AE_NO_MEMORY);
252 }
253@@ -204,7 +204,7 @@ AcpiFindRootPointer (
254 {
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));
259
260 return_ACPI_STATUS (AE_NO_MEMORY);
261 }
262@@ -236,7 +236,7 @@ AcpiFindRootPointer (
263 {
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));
268
269 return_ACPI_STATUS (AE_NO_MEMORY);
270 }
b643ab7e 271Index: acpica-unix2-20220331/source/components/utilities/utownerid.c
77760c90 272===================================================================
b643ab7e
JB
273--- acpica-unix2-20220331.orig/source/components/utilities/utownerid.c
274+++ acpica-unix2-20220331/source/components/utilities/utownerid.c
25d7dd99 275@@ -237,7 +237,7 @@ AcpiUtReleaseOwnerId (
77760c90
JB
276 else
277 {
278 ACPI_ERROR ((AE_INFO,
70586bb3 279- "Attempted release of non-allocated OwnerId: 0x%3.3X", OwnerId + 1));
77760c90
JB
280+ "Release of non-allocated OwnerId: 0x%2.2X", (UINT32) OwnerId + 1));
281 }
282
283 (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);
This page took 0.070327 seconds and 4 git commands to generate.