fix invalid printf format string complained by coverity,
CID 323914: (#1 of 1): Invalid printf format string (PRINTF_ARGS)
format_error: Invalid conversion specifier in %;.
Currently, the update glib to libglib2.0-0t64 on armhf,
causes pointer-to-int-cast error, it seems build failed
with _FILE_OFFSET_BITS=64 on 32-bit.
fwts_acpi_tables.c:173:30: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
173 | if ((mem = fwts_mmap((off_t)addr, sizeof(fwts_acpi_table_rsdp))) == FWTS_MAP_FAILED)
fwts_acpi_tables.c:486:53: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
486 | fwts_acpi_add_table("RSDP", rsdp, (uint64_t)(off_t)rsdp_addr, rsdp_len, FWTS_ACPI_TABLE_FROM_FIRMWARE);
change the off_t to long int to fix this, let's see if any
update for this.
Changes in this release of ACPICA are detailed below (from
ACPICA documents/changes.txt):
Major changes:
* Update all the license header year from 2023 to 2024.
* Fix table argument ordering to work properly with iasl.
* Get rid of the annoying repeated warning types in MSVC and Windows.
* Fix a test in ASLTS with edge case failure.
* Fix a couple of issues with how GPEs are counted and enabled.
* Add new tables for various architectures/OS, mainly RISC-V and also
update many more.
* Add an option to either make the output deterministic or
non-deterministic.
* Remove redundant checks, duplicated code and fix spellings in various
files.
* Fix flex arrays for C++ compilers and also make ACPICA overall more
compatible with different compilers which throw warnings related to
memory sanitization etc.
Signed-off-by: Colin Ian King <email address hidden>
Acked-by: Ivan Hu <email address hidden>
ACPI specification implies that a port is not connectable and it is assumed to
be not visible. Therefore a \_PLD descriptor is not required.
Some firmware have _PLD ACPI methods for all USB ports, including unusable
USB host ports that are not wired to any connector or internal device.
And these unusable ports return similar _PLD objects, with zeroes in their
grouptoken and position fields. This confuses the port peering code when
pairing USB2 and USB3 ports that are wired to the same connector. And it is
results in the linux kernel warning "usb: port power management may be
unreliable."
Add tests to check the PLD methods existencs on the connectable ports.
Fix resource leak found by coverity,
CID 323867: (#1 of 1): Resource leak (RESOURCE_LEAK)
25. leaked_storage: Variable cpus going out of scope
leaks the storage it points to.
fix resource leak found by coverity,
CID 323922: (#1 of 1): Resource leak (RESOURCE_LEAK)
28. leaked_storage: Variable my_buffer going out of scope
leaks the storage it points to.
coverity scan the length is untrust loop bound, which is from
tainted_data_downcast fwts_acpi_table_srat, use table->length
to avoid this warning, no function impact.
CID 323875: (#1 of 1): Untrusted loop bound (TAINTED_SCALAR)
5. tainted_data: Using tainted variable length as a loop boundary.