To support this change, turn on lots more compiler warnings, and fix all the warnings generated.
Showing the changes to src/oss.c (1 of 93 files). Show all
Unified · Split
| @@ -51,7 +51,7 @@ static int ossdspinit(ft_t ft) · 50 unmodified lines | ||
| 51 | 51 | if (ft->info.size == ST_SIZE_BYTE) { |
| 52 | 52 | sampletype = AFMT_U8; |
| 53 | 53 | samplesize = 8; |
| 54 | − if (ft->info.encoding == -1) | |
| 54 | + if (ft->info.encoding == ST_ENCODING_UNKNOWN) | |
| 55 | 55 | ft->info.encoding = ST_ENCODING_UNSIGNED; |
| 56 | 56 | if (ft->info.encoding != ST_ENCODING_UNSIGNED) { |
| 57 | 57 | st_report("OSS driver only supports unsigned with bytes"); |
| @@ -62,7 +62,7 @@ static int ossdspinit(ft_t ft) · 4 unmodified lines | ||
| 62 | 62 | else if (ft->info.size == ST_SIZE_WORD) { |
| 63 | 63 | sampletype = (ST_IS_BIGENDIAN) ? AFMT_S16_BE : AFMT_S16_LE; |
| 64 | 64 | samplesize = 16; |
| 65 | − if (ft->info.encoding == -1) | |
| 65 | + if (ft->info.encoding == ST_ENCODING_UNKNOWN) | |
| 66 | 66 | ft->info.encoding = ST_ENCODING_SIGN2; |
| 67 | 67 | if (ft->info.encoding != ST_ENCODING_SIGN2) { |
| 68 | 68 | st_report("OSS driver only supports signed with words"); |
| @@ -79,7 +79,7 @@ static int ossdspinit(ft_t ft) · 10 unmodified lines | ||
| 79 | 79 | st_report("Forcing to signed linear word"); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | − if (ft->info.channels == -1) ft->info.channels = 1; | |
| 82 | + if (ft->info.channels == 0) ft->info.channels = 1; | |
| 83 | 83 | else if (ft->info.channels > 2) ft->info.channels = 2; |
| 84 | 84 | |
| 85 | 85 | if (ioctl(fileno(ft->fp), SNDCTL_DSP_RESET, 0) < 0) |
| @@ -204,14 +204,14 @@ static int ossdspinit(ft_t ft) · 118 unmodified lines | ||
| 204 | 204 | * size and encoding of samples, |
| 205 | 205 | * mono/stereo/quad. |
| 206 | 206 | */ |
| 207 | −int st_ossdspstartread(ft_t ft) | |
| 207 | +static int st_ossdspstartread(ft_t ft) | |
| 208 | 208 | { |
| 209 | 209 | int rc; |
| 210 | 210 | rc = ossdspinit(ft); |
| 211 | 211 | return rc; |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | −int st_ossdspstartwrite(ft_t ft) | |
| 214 | +static int st_ossdspstartwrite(ft_t ft) | |
| 215 | 215 | { |
| 216 | 216 | return ossdspinit(ft); |
| 217 | 217 | } |