diff options
author | PA4WDH | 2024-08-26 19:56:17 +0200 |
---|---|---|
committer | PA4WDH | 2024-08-26 19:56:17 +0200 |
commit | f47ea91e2d1b04aea2c23f40c98801e948d7a950 (patch) | |
tree | a949edc52e7ad7bbb2413107fd29ab1dc5af85c9 /cpulist.c | |
parent | Small fixes in cpulist.c (diff) | |
download | cputemp2maxfreq-f47ea91e2d1b04aea2c23f40c98801e948d7a950.tar.gz cputemp2maxfreq-f47ea91e2d1b04aea2c23f40c98801e948d7a950.tar.bz2 cputemp2maxfreq-f47ea91e2d1b04aea2c23f40c98801e948d7a950.zip |
Add more compiler warnings
Diffstat (limited to 'cpulist.c')
-rw-r--r-- | cpulist.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -19,7 +19,7 @@ void cpulist_add(char *cpu) int newlen; newlen=cpudata.cpulist_len+1; - cpudata.cpulist=reallocarray(cpudata.cpulist,newlen,sizeof(char *)); + cpudata.cpulist=reallocarray(cpudata.cpulist,(size_t) newlen,sizeof(char *)); cpudata.cpulist[cpudata.cpulist_len]=malloc(strlen(cpu)+1); strcpy(cpudata.cpulist[cpudata.cpulist_len],cpu); @@ -77,7 +77,7 @@ int cpulist_find_cpus() { DEBUG2_CPULIST("Found CPU %s\n",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); + package=(int) sysfs_read_long_int(sysfs_file); DEBUG2_CPULIST("CPU Belongs to package id %d\n",package); if ((package==config.cpu) || (config.cpu<0)) { |