To support this change, turn on lots more compiler warnings, and fix all the warnings generated.
Showing the changes to src/tx16w.c (1 of 93 files). Show all
Unified · Split
| @@ -74,7 +74,7 @@ static st_size_t writedone=0; · 73 unmodified lines | ||
| 74 | 74 | * size and encoding of samples, |
| 75 | 75 | * mono/stereo/quad. |
| 76 | 76 | */ |
| 77 | −int st_txwstartread(ft_t ft) | |
| 77 | +static int st_txwstartread(ft_t ft) | |
| 78 | 78 | { |
| 79 | 79 | int c; |
| 80 | 80 | char filetype[7]; |
| @@ -186,10 +186,10 @@ int st_txwstartread(ft_t ft) · 105 unmodified lines | ||
| 186 | 186 | * Return number of samples read. |
| 187 | 187 | */ |
| 188 | 188 | |
| 189 | −st_ssize_t st_txwread(ft_t ft, st_sample_t *buf, st_size_t len) | |
| 189 | +static st_size_t st_txwread(ft_t ft, st_sample_t *buf, st_size_t len) | |
| 190 | 190 | { |
| 191 | 191 | txw_t sk = (txw_t) ft->priv; |
| 192 | − int done = 0; | |
| 192 | + st_size_t done = 0; | |
| 193 | 193 | unsigned char uc1,uc2,uc3; |
| 194 | 194 | unsigned short s1,s2; |
| 195 | 195 | |
| @@ -236,16 +236,7 @@ st_ssize_t st_txwread(ft_t ft, st_sample_t *buf, st_size_t len) · 40 unmodified lines | ||
| 236 | 236 | return done; |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | −/* | |
| 240 | − * Do anything required when you stop reading samples. | |
| 241 | − * Don't close input file! | |
| 242 | − */ | |
| 243 | −int st_txwstopread(ft_t ft) | |
| 244 | −{ | |
| 245 | − return(ST_SUCCESS); | |
| 246 | −} | |
| 247 | − | |
| 248 | −int st_txwstartwrite(ft_t ft) | |
| 239 | +static int st_txwstartwrite(ft_t ft) | |
| 249 | 240 | { |
| 250 | 241 | struct WaveHeader_ WH; |
| 251 | 242 | |
| @@ -276,9 +267,9 @@ int st_txwstartwrite(ft_t ft) · 24 unmodified lines | ||
| 276 | 267 | return(ST_SUCCESS); |
| 277 | 268 | } |
| 278 | 269 | |
| 279 | −st_ssize_t st_txwwrite(ft_t ft, const st_sample_t *buf, st_size_t len) | |
| 270 | +static st_size_t st_txwwrite(ft_t ft, const st_sample_t *buf, st_size_t len) | |
| 280 | 271 | { |
| 281 | − int i; | |
| 272 | + st_size_t i; | |
| 282 | 273 | unsigned int w1,w2; |
| 283 | 274 | |
| 284 | 275 | tx16w_len += len; |
| @@ -299,7 +290,7 @@ st_ssize_t st_txwwrite(ft_t ft, const st_sample_t *buf, st_size_t len) · 14 unmodified lines | ||
| 299 | 290 | return(len); |
| 300 | 291 | } |
| 301 | 292 | |
| 302 | −int st_txwstopwrite(ft_t ft) | |
| 293 | +static int st_txwstopwrite(ft_t ft) | |
| 303 | 294 | { |
| 304 | 295 | struct WaveHeader_ WH; |
| 305 | 296 | int AttackLength, LoopLength, i; |
| @@ -388,7 +379,7 @@ static st_format_t st_txw_format = { · 82 unmodified lines | ||
| 388 | 379 | 0, |
| 389 | 380 | st_txwstartread, |
| 390 | 381 | st_txwread, |
| 391 | − st_txwstopread, | |
| 382 | + st_format_nothing, | |
| 392 | 383 | st_txwstartwrite, |
| 393 | 384 | st_txwwrite, |
| 394 | 385 | st_txwstopwrite, |