Debian Codegraph @

debian/patches/int-format.patch

raw
1 Use proper integer formatting
2
3 From: Al Stone <[email protected]>
4
5
6 ---
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(-)
23
24 Index: acpica-unix-20221020/source/compiler/aslerror.c
25 ===================================================================
26 --- acpica-unix-20221020.orig/source/compiler/aslerror.c
27 +++ acpica-unix-20221020/source/compiler/aslerror.c
28 @@ -1025,7 +1025,7 @@ AslLogNewError (
29 AslGbl_ExceptionCount[ModifiedLevel]++;
30 if (!AslGbl_IgnoreErrors && AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
31 {
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);
34
35 AslGbl_SourceLine = 0;
36 AslGbl_NextError = AslGbl_ErrorLog;
37 Index: acpica-unix-20221020/source/compiler/aslopt.c
38 ===================================================================
39 --- acpica-unix-20221020.orig/source/compiler/aslopt.c
40 +++ acpica-unix-20221020/source/compiler/aslopt.c
41 @@ -691,7 +691,7 @@ OptOptimizeNamePath (
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)));
50 Index: acpica-unix-20221020/source/compiler/aslprepkg.c
51 ===================================================================
52 --- acpica-unix-20221020.orig/source/compiler/aslprepkg.c
53 +++ acpica-unix-20221020/source/compiler/aslprepkg.c
54 @@ -428,7 +428,7 @@ ApCheckPackage (
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,
63 Index: acpica-unix-20221020/source/components/debugger/dbexec.c
64 ===================================================================
65 --- acpica-unix-20221020.orig/source/components/debugger/dbexec.c
66 +++ acpica-unix-20221020/source/components/debugger/dbexec.c
67 @@ -339,7 +339,7 @@ AcpiDbExecuteMethod (
68 ACPI_ERROR ((AE_INFO,
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));
73 }
74 }
75
76 Index: acpica-unix-20221020/source/components/dispatcher/dsmthdat.c
77 ===================================================================
78 --- acpica-unix-20221020.orig/source/components/dispatcher/dsmthdat.c
79 +++ acpica-unix-20221020/source/components/dispatcher/dsmthdat.c
80 @@ -399,7 +399,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 @@ -414,7 +414,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 }
98 Index: acpica-unix-20221020/source/components/dispatcher/dsutils.c
99 ===================================================================
100 --- acpica-unix-20221020.orig/source/components/dispatcher/dsutils.c
101 +++ acpica-unix-20221020/source/components/dispatcher/dsutils.c
102 @@ -894,7 +894,7 @@ AcpiDsCreateOperands (
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 */
111 Index: acpica-unix-20221020/source/components/dispatcher/dswscope.c
112 ===================================================================
113 --- acpica-unix-20221020.orig/source/components/dispatcher/dswscope.c
114 +++ acpica-unix-20221020/source/components/dispatcher/dswscope.c
115 @@ -257,7 +257,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)
124 @@ -319,7 +319,7 @@ AcpiDsScopeStackPop (
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)));
133 Index: acpica-unix-20221020/source/components/events/evgpe.c
134 ===================================================================
135 --- acpica-unix-20221020.orig/source/components/events/evgpe.c
136 +++ acpica-unix-20221020/source/components/events/evgpe.c
137 @@ -596,7 +596,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));
145 continue;
146 Index: acpica-unix-20221020/source/components/executer/exdump.c
147 ===================================================================
148 --- acpica-unix-20221020.orig/source/components/executer/exdump.c
149 +++ acpica-unix-20221020/source/components/executer/exdump.c
150 @@ -786,7 +786,7 @@ AcpiExDumpOperand (
151 if (Depth > 0)
152 {
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));
156 }
157 else
158 {
159 Index: acpica-unix-20221020/source/components/executer/exfldio.c
160 ===================================================================
161 --- acpica-unix-20221020.orig/source/components/executer/exfldio.c
162 +++ acpica-unix-20221020/source/components/executer/exfldio.c
163 @@ -789,8 +789,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 }
174 Index: acpica-unix-20221020/source/components/executer/exnames.c
175 ===================================================================
176 --- acpica-unix-20221020.orig/source/components/executer/exnames.c
177 +++ acpica-unix-20221020/source/components/executer/exnames.c
178 @@ -345,7 +345,7 @@ AcpiExNameSegment (
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
187 @@ -357,7 +357,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));
193 }
194
195 *InAmlAddress = ACPI_CAST_PTR (UINT8, AmlAddress);
196 Index: acpica-unix-20221020/source/components/hardware/hwregs.c
197 ===================================================================
198 --- acpica-unix-20221020.orig/source/components/hardware/hwregs.c
199 +++ acpica-unix-20221020/source/components/hardware/hwregs.c
200 @@ -568,7 +568,7 @@ AcpiHwClearAcpiStatus (
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);
209 Index: acpica-unix-20221020/source/components/tables/tbfadt.c
210 ===================================================================
211 --- acpica-unix-20221020.orig/source/components/tables/tbfadt.c
212 +++ acpica-unix-20221020/source/components/tables/tbfadt.c
213 @@ -341,7 +341,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 }
222 @@ -411,7 +411,7 @@ AcpiTbSelectAddress (
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
231 @@ -739,7 +739,7 @@ AcpiTbConvertFadt (
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));
240 Index: acpica-unix-20221020/source/components/tables/tbxfroot.c
241 ===================================================================
242 --- acpica-unix-20221020.orig/source/components/tables/tbxfroot.c
243 +++ acpica-unix-20221020/source/components/tables/tbxfroot.c
244 @@ -286,7 +286,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 @@ -326,7 +326,7 @@ AcpiFindRootPointer (
254 {
255 ACPI_ERROR ((AE_INFO,
256 "Could not map memory at 0x%8.8X for length %u",
257 - PhysicalAddress, EbdaWindowSize));
258 + PhysicalAddress, (UINT32) EbdaWindowSize));
259
260 return_ACPI_STATUS (AE_NO_MEMORY);
261 }
262 @@ -358,7 +358,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 }
271 Index: acpica-unix-20221020/source/components/utilities/utownerid.c
272 ===================================================================
273 --- acpica-unix-20221020.orig/source/components/utilities/utownerid.c
274 +++ acpica-unix-20221020/source/components/utilities/utownerid.c
275 @@ -345,7 +345,7 @@ AcpiUtReleaseOwnerId (
276 else
277 {
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));
281 }
282
283 (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);