diff options
author | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-06-29 15:52:46 +0200 |
---|---|---|
committer | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-07-17 10:50:07 +0200 |
commit | c0e174c085478e8bcea1a31d527df6e58f7448d1 (patch) | |
tree | 68beae1bb02a202a0793c008892a7c423c430cd9 /binding/convenience/convenience.c | |
parent | d564d41b640f3ed69e16cc0e2eaf258778191b04 (diff) |
Fixed compilation warnings
Fixed all the compilation warning that appeared
with the latest version of gcc.
There are still warnings in the gstreamer headers,
that would likely be fixed by a gstreamer bump.
Change-Id: I3ae7698dbff47303be366d9755a643a013bb4e51
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'binding/convenience/convenience.c')
-rw-r--r-- | binding/convenience/convenience.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/binding/convenience/convenience.c b/binding/convenience/convenience.c index 517dc4e..ae1e24b 100644 --- a/binding/convenience/convenience.c +++ b/binding/convenience/convenience.c @@ -40,7 +40,7 @@ double atofs(char *s) /* standard suffixes */ { char last; - int len; + size_t len; double suff = 1.0; len = strlen(s); last = s[len-1]; @@ -49,9 +49,11 @@ double atofs(char *s) case 'g': case 'G': suff *= 1e3; + /*@fallthrough@*/ case 'm': case 'M': suff *= 1e3; + /*@fallthrough@*/ case 'k': case 'K': suff *= 1e3; @@ -67,7 +69,7 @@ double atoft(char *s) /* time suffixes, returns seconds */ { char last; - int len; + size_t len; double suff = 1.0; len = strlen(s); last = s[len-1]; @@ -76,9 +78,11 @@ double atoft(char *s) case 'h': case 'H': suff *= 60; + /*@fallthrough@*/ case 'm': case 'M': suff *= 60; + /*@fallthrough@*/ case 's': case 'S': suff *= atof(s); @@ -93,7 +97,7 @@ double atofp(char *s) /* percent suffixes */ { char last; - int len; + size_t len; double suff = 1.0; len = strlen(s); last = s[len-1]; @@ -243,7 +247,8 @@ int verbose_reset_buffer(rtlsdr_dev_t *dev) int verbose_device_search(char *s) { - int i, device_count, device, offset; + int i, device_count, device; + ssize_t offset; char *s2; char vendor[256], product[256], serial[256]; device_count = rtlsdr_get_device_count(); |