From da347a996939a8fe7277d180d0098094332e63d7 Mon Sep 17 00:00:00 2001 From: PA4WDH Date: Sun, 25 Aug 2024 16:57:08 +0200 Subject: Add -Wall -Werror and fix warnings --- cpulist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpulist.c') diff --git a/cpulist.c b/cpulist.c index 307638d..dfb4733 100644 --- a/cpulist.c +++ b/cpulist.c @@ -44,7 +44,7 @@ int cpulist_find_cpus() { DIR *cpudir; struct dirent *cpu_dirent; - char sysfs_file[128]; + char sysfs_file[309]; int package; DEBUG1_CPULIST("Started\n") @@ -72,7 +72,7 @@ int cpulist_find_cpus() if (cpulist_is_cpu(cpu_dirent->d_name)) { DEBUG2_CPULIST("Found CPU %s\n",cpu_dirent->d_name); - snprintf(sysfs_file,128,"/sys/devices/system/cpu/%s/topology/physical_package_id",cpu_dirent->d_name); + snprintf(sysfs_file,309,"/sys/devices/system/cpu/%s/topology/physical_package_id",cpu_dirent->d_name); package=sysfs_read_long_int(sysfs_file); DEBUG2_CPULIST("CPU Belongs to package id %d\n",package); if ((package==config.cpu) || (config.cpu<0)) -- cgit v1.2.3