aboutsummaryrefslogtreecommitdiffstats
path: root/sysfs.c
diff options
context:
space:
mode:
authorPA4WDH2024-08-26 19:56:17 +0200
committerPA4WDH2024-08-26 19:56:17 +0200
commitf47ea91e2d1b04aea2c23f40c98801e948d7a950 (patch)
treea949edc52e7ad7bbb2413107fd29ab1dc5af85c9 /sysfs.c
parentSmall fixes in cpulist.c (diff)
downloadcputemp2maxfreq-f47ea91e2d1b04aea2c23f40c98801e948d7a950.tar.gz
cputemp2maxfreq-f47ea91e2d1b04aea2c23f40c98801e948d7a950.tar.bz2
cputemp2maxfreq-f47ea91e2d1b04aea2c23f40c98801e948d7a950.zip
Add more compiler warnings
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysfs.c b/sysfs.c
index d6e4d60..6ea7701 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -12,7 +12,7 @@ extern struct s_config config;
int sysfs_read_str(char *sysfs_file,char *buf,size_t bufsize)
{
int sysfs_handle;
- size_t datalen;
+ ssize_t datalen;
DEBUG1_SYSFS("Reading sysfs file %s\n",sysfs_file);
@@ -35,7 +35,7 @@ int sysfs_read_str(char *sysfs_file,char *buf,size_t bufsize)
buf[datalen]=0;
}
- return datalen;
+ return (int) datalen;
}
long int sysfs_read_long_int(char *sysfs_file)
@@ -54,7 +54,7 @@ long int sysfs_read_long_int(char *sysfs_file)
int sysfs_write_str(char *sysfs_file,char *value,long int checkdelay)
{
int sysfs_handle;
- size_t len;
+ ssize_t len;
char buf[255];
DEBUG1_SYSFS("Writing %s to sysfs file %s\n",value,sysfs_file);
@@ -75,7 +75,7 @@ int sysfs_write_str(char *sysfs_file,char *value,long int checkdelay)
DEBUG2_SYSFS("Written %zd bytes\n",len);
// Wait if instructed to
- if (checkdelay>0) usleep(checkdelay);
+ if (checkdelay>0) usleep((unsigned int) checkdelay);
// Validate we actually set what we want to set
sysfs_read_str(sysfs_file,buf,sizeof(buf));