From 0fc10268e0512cf08a7dfe4dc3aa5d22de97656c Mon Sep 17 00:00:00 2001 From: Lt-Henry Date: Mon, 17 Jan 2022 22:45:45 +0100 Subject: [PATCH] acpi_thermal: Fix 64-bit warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5ee12a6d07a9ed61d0025c4e9e650da08a1326f8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4870 Reviewed-by: Jérôme Duval Tested-by: Commit checker robot --- .../kernel/drivers/power/acpi_thermal/acpi_thermal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/drivers/power/acpi_thermal/acpi_thermal.c b/src/add-ons/kernel/drivers/power/acpi_thermal/acpi_thermal.c index c6159ebcaa..36a3c2e128 100644 --- a/src/add-ons/kernel/drivers/power/acpi_thermal/acpi_thermal.c +++ b/src/add-ons/kernel/drivers/power/acpi_thermal/acpi_thermal.c @@ -64,18 +64,18 @@ acpi_thermal_read(void* _cookie, off_t position, void* buf, size_t* num_bytes) char* str = (char*)buf; acpi_thermal_control(device, drvOpGetThermalType, &therm_info, 0); - snprintf(str, max_len, " Critical Temperature: %lu.%lu K\n", + snprintf(str, max_len, " Critical Temperature: %"B_PRIu32" %"B_PRIu32" K\n", (therm_info.critical_temp / 10), (therm_info.critical_temp % 10)); max_len -= strlen(str); str += strlen(str); - snprintf(str, max_len, " Current Temperature: %lu.%lu K\n", + snprintf(str, max_len, " Current Temperature: %"B_PRIu32" %"B_PRIu32" K\n", (therm_info.current_temp / 10), (therm_info.current_temp % 10)); if (therm_info.hot_temp > 0) { max_len -= strlen(str); str += strlen(str); - snprintf(str, max_len, " Hot Temperature: %lu.%lu K\n", + snprintf(str, max_len, " Hot Temperature: %"B_PRIu32" %"B_PRIu32" K\n", (therm_info.hot_temp / 10), (therm_info.hot_temp % 10)); }