From f6e0d1d3681176fb809d9e120837e98c514bfc21 Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Wed, 30 Apr 2025 19:36:54 +0200 Subject: [PATCH] common-linux: Fix -Wformat warnings. --- common/Linux/LnxMisc.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/Linux/LnxMisc.cpp b/common/Linux/LnxMisc.cpp index bdba7d7aa3..a6e6d35658 100644 --- a/common/Linux/LnxMisc.cpp +++ b/common/Linux/LnxMisc.cpp @@ -54,18 +54,18 @@ u64 GetAvailablePhysicalMemory() while (fgets(line, sizeof(line), file)) { // Modern kernels provide MemAvailable directly - preferred and most accurate. - if (sscanf(line, "MemAvailable: %llu kB", &mem_available) == 1) + if (sscanf(line, "MemAvailable: %lu kB", &mem_available) == 1) { fclose(file); return mem_available * _1kb; } // Fallback values for manual approximation. - sscanf(line, "MemFree: %llu kB", &mem_free); - sscanf(line, "Buffers: %llu kB", &buffers); - sscanf(line, "Cached: %llu kB", &cached); - sscanf(line, "SReclaimable: %llu kB", &sreclaimable); - sscanf(line, "Shmem: %llu kB", &shmem); + sscanf(line, "MemFree: %lu kB", &mem_free); + sscanf(line, "Buffers: %lu kB", &buffers); + sscanf(line, "Cached: %lu kB", &cached); + sscanf(line, "SReclaimable: %lu kB", &sreclaimable); + sscanf(line, "Shmem: %lu kB", &shmem); } fclose(file);