acpi_thermal: Fix 64-bit warnings

Change-Id: I5ee12a6d07a9ed61d0025c4e9e650da08a1326f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4870
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Lt-Henry
2022-01-18 08:52:37 +00:00
committed by Jérôme Duval
parent 01cb3ed58e
commit 0fc10268e0
@@ -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));
}