To support this change, turn on lots more compiler warnings, and fix all the warnings generated.
Showing the changes to src/sphere.c (1 of 93 files). Show all
Unified · Split
| @@ -1,8 +1,6 @@ | ||
| 1 | 1 | /* |
| 2 | 2 | * NIST Sphere file format handler. |
| 3 | − */ | |
| 4 | − | |
| 5 | −/* | |
| 3 | + * | |
| 6 | 4 | * August 7, 2000 |
| 7 | 5 | * |
| 8 | 6 | * Copyright (C) 2000 Chris Bagwell (cbagwell@sprynet.com) |
| @@ -28,7 +26,7 @@ typedef struct spherestuff { · 19 unmodified lines | ||
| 28 | 26 | * size and encoding of samples, |
| 29 | 27 | * mono/stereo/quad. |
| 30 | 28 | */ |
| 31 | −int st_spherestartread(ft_t ft) | |
| 29 | +static int st_spherestartread(ft_t ft) | |
| 32 | 30 | { |
| 33 | 31 | sphere_t sphere = (sphere_t) ft->priv; |
| 34 | 32 | int rc; |
| @@ -85,7 +83,7 @@ int st_spherestartread(ft_t ft) · 50 unmodified lines | ||
| 85 | 83 | ft->info.size = i; |
| 86 | 84 | } |
| 87 | 85 | if (strncmp(buf, "channel_count", 13) == 0 && |
| 88 | − ft->info.channels == -1) | |
| 86 | + ft->info.channels == 0) | |
| 89 | 87 | { |
| 90 | 88 | sscanf(buf, "%63s %15s %d", fldname, fldtype, &i); |
| 91 | 89 | ft->info.channels = i; |
| @@ -96,7 +94,7 @@ int st_spherestartread(ft_t ft) · 4 unmodified lines | ||
| 96 | 94 | /* Only bother looking for ulaw flag. All others |
| 97 | 95 | * should be caught below by default PCM check |
| 98 | 96 | */ |
| 99 | − if (ft->info.encoding == -1 && | |
| 97 | + if (ft->info.encoding == ST_ENCODING_UNKNOWN && | |
| 100 | 98 | strncmp(fldsval,"ulaw",4) == 0) |
| 101 | 99 | { |
| 102 | 100 | ft->info.encoding = ST_ENCODING_ULAW; |
| @@ -146,7 +144,7 @@ int st_spherestartread(ft_t ft) · 43 unmodified lines | ||
| 146 | 144 | * This means encoding is signed if size = word or |
| 147 | 145 | * unsigned if size = byte. |
| 148 | 146 | */ |
| 149 | − if (ft->info.encoding == -1) | |
| 147 | + if (ft->info.encoding == ST_ENCODING_UNKNOWN) | |
| 150 | 148 | { |
| 151 | 149 | if (ft->info.size == 1) |
| 152 | 150 | ft->info.encoding = ST_ENCODING_UNSIGNED; |
| @@ -190,7 +188,7 @@ int st_spherestartread(ft_t ft) · 37 unmodified lines | ||
| 190 | 188 | * Return number of samples read. |
| 191 | 189 | */ |
| 192 | 190 | |
| 193 | −st_ssize_t st_sphereread(ft_t ft, st_sample_t *buf, st_size_t len) | |
| 191 | +static st_size_t st_sphereread(ft_t ft, st_sample_t *buf, st_size_t len) | |
| 194 | 192 | { |
| 195 | 193 | sphere_t sphere = (sphere_t) ft->priv; |
| 196 | 194 | |
| @@ -204,7 +202,7 @@ st_ssize_t st_sphereread(ft_t ft, st_sample_t *buf, st_size_t len) · 7 unmodified lines | ||
| 204 | 202 | return st_rawread(ft, buf, len); |
| 205 | 203 | } |
| 206 | 204 | |
| 207 | −int st_spherestartwrite(ft_t ft) | |
| 205 | +static int st_spherestartwrite(ft_t ft) | |
| 208 | 206 | { |
| 209 | 207 | int rc; |
| 210 | 208 | int x; |
| @@ -243,7 +241,7 @@ int st_spherestartwrite(ft_t ft) · 32 unmodified lines | ||
| 243 | 241 | |
| 244 | 242 | } |
| 245 | 243 | |
| 246 | −st_ssize_t st_spherewrite(ft_t ft, const st_sample_t *buf, st_size_t len) | |
| 244 | +static st_size_t st_spherewrite(ft_t ft, const st_sample_t *buf, st_size_t len) | |
| 247 | 245 | { |
| 248 | 246 | sphere_t sphere = (sphere_t) ft->priv; |
| 249 | 247 | |
| @@ -251,7 +249,7 @@ st_ssize_t st_spherewrite(ft_t ft, const st_sample_t *buf, st_size_t len) · 1 unmodified line | ||
| 251 | 249 | return st_rawwrite(ft, buf, len); |
| 252 | 250 | } |
| 253 | 251 | |
| 254 | −int st_spherestopwrite(ft_t ft) | |
| 252 | +static int st_spherestopwrite(ft_t ft) | |
| 255 | 253 | { |
| 256 | 254 | int rc; |
| 257 | 255 | char buf[128]; |