diff options
author | rbuj <[email protected]> | 2019-09-05 19:48:03 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-09-10 14:43:33 +0200 |
commit | d839dfb7516dcc88f3766b3af572d52b04d8bc5c (patch) | |
tree | afb0e105e918a39fc312d73f73409113f7daed81 /cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c | |
parent | 4a3dcc61aeaa31b1403288a65c9074e7d24a8dfe (diff) | |
download | mate-applets-d839dfb7516dcc88f3766b3af572d52b04d8bc5c.tar.bz2 mate-applets-d839dfb7516dcc88f3766b3af572d52b04d8bc5c.tar.xz |
cpufreq: remove -Wabsolute-value warning
cpufreq-selector-sysfs.c:244:18: warning: taking the absolute value of unsigned type ‘guint’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
244 | current_dist = abs (frequency - f);
| ^~~
--
cpufreq-selector-procfs.c:187:7: warning: taking the absolute value of unsigned type ‘guint’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
187 | if (abs (sc_max - frequency) < abs (frequency - sc_min))
| ^~~
cpufreq-selector-procfs.c:187:34: warning: taking the absolute value of unsigned type ‘guint’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
187 | if (abs (sc_max - frequency) < abs (frequency - sc_min))
| ^~~
--
cpufreq-selector-libcpufreq.c:109:18: warning: taking the absolute value of unsigned type ‘long unsigned int’ has no effect [-Wabsolute-value]
109 | current_dist = abs (freq->frequency - frequency);
| ^~~
Diffstat (limited to 'cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c')
-rw-r--r-- | cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c b/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c index 1cb87660..c1b0850c 100644 --- a/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c +++ b/cpufreq/src/cpufreq-selector/cpufreq-selector-sysfs.c @@ -241,7 +241,7 @@ cpufreq_selector_sysfs_get_valid_frequency (CPUFreqSelectorSysfs *selector, if (f == frequency) return freq; - current_dist = abs (frequency - f); + current_dist = abs ((int)frequency - (int)f); if (current_dist < dist) { dist = current_dist; retval = freq; |