To support this change, turn on lots more compiler warnings, and fix all the warnings generated.
Showing the changes to src/compand.c (1 of 93 files). Show all
Unified · Split
| @@ -70,7 +70,7 @@ typedef struct { · 69 unmodified lines | |||
| 70 | * Don't do initialization now. | 70 | * Don't do initialization now. |
| 71 | * The 'info' fields are not yet filled in. | 71 | * The 'info' fields are not yet filled in. |
| 72 | */ | 72 | */ |
| 73 | int st_compand_getopts(eff_t effp, int n, char **argv) | 73 | static int st_compand_getopts(eff_t effp, int n, char **argv) |
| 74 | { | 74 | { |
| 75 | compand_t l = (compand_t) effp->priv; | 75 | compand_t l = (compand_t) effp->priv; |
| 76 | 76 | ||
| @@ -191,7 +191,7 @@ int st_compand_getopts(eff_t effp, int n, char **argv) · 114 unmodified lines | |||
| 191 | * Prepare processing. | 191 | * Prepare processing. |
| 192 | * Do all initializations. | 192 | * Do all initializations. |
| 193 | */ | 193 | */ |
| 194 | int st_compand_start(eff_t effp) | 194 | static int st_compand_start(eff_t effp) |
| 195 | { | 195 | { |
| 196 | compand_t l = (compand_t) effp->priv; | 196 | compand_t l = (compand_t) effp->priv; |
| 197 | int i; | 197 | int i; |
| @@ -264,14 +264,14 @@ static void doVolume(double *v, double samp, compand_t l, int chan) · 66 unmodified lines | |||
| 264 | * Processed signed long samples from ibuf to obuf. | 264 | * Processed signed long samples from ibuf to obuf. |
| 265 | * Return number of samples processed. | 265 | * Return number of samples processed. |
| 266 | */ | 266 | */ |
| 267 | int st_compand_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, | 267 | static int st_compand_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, |
| 268 | st_size_t *isamp, st_size_t *osamp) | 268 | st_size_t *isamp, st_size_t *osamp) |
| 269 | { | 269 | { |
| 270 | compand_t l = (compand_t) effp->priv; | 270 | compand_t l = (compand_t) effp->priv; |
| 271 | int len = (*isamp > *osamp) ? *osamp : *isamp; | 271 | int len = (*isamp > *osamp) ? *osamp : *isamp; |
| 272 | int filechans = effp->outinfo.channels; | 272 | int filechans = effp->outinfo.channels; |
| 273 | int idone,odone; | 273 | int idone,odone; |
| 274 | int64_t checkbuf; //if st_sample_t of type int32_t | 274 | int64_t checkbuf; /* if st_sample_t of type int32_t */ |
| 275 | 275 | ||
| 276 | for (idone = 0,odone = 0; idone < len; ibuf += filechans) { | 276 | for (idone = 0,odone = 0; idone < len; ibuf += filechans) { |
| 277 | int chan; | 277 | int chan; |
| @@ -326,7 +326,7 @@ int st_compand_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 48 unmodified lines | |||
| 326 | { | 326 | { |
| 327 | if (l->delay_buf_cnt >= l->delay_buf_size) | 327 | if (l->delay_buf_cnt >= l->delay_buf_size) |
| 328 | { | 328 | { |
| 329 | l->delay_buf_full=1; //delay buffer is now definetly full | 329 | l->delay_buf_full=1; /* delay buffer is now definetly full */ |
| 330 | checkbuf = l->delay_buf[l->delay_buf_ptr]*(outv/v)*l->outgain; | 330 | checkbuf = l->delay_buf[l->delay_buf_ptr]*(outv/v)*l->outgain; |
| 331 | ST_SAMPLE_CLIP_COUNT(checkbuf, effp->clippedCount); | 331 | ST_SAMPLE_CLIP_COUNT(checkbuf, effp->clippedCount); |
| 332 | obuf[odone] = checkbuf; | 332 | obuf[odone] = checkbuf; |
| @@ -337,7 +337,7 @@ int st_compand_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 4 unmodified lines | |||
| 337 | else | 337 | else |
| 338 | { | 338 | { |
| 339 | l->delay_buf_cnt++; | 339 | l->delay_buf_cnt++; |
| 340 | idone++; //no "odone++" because we did not fill obuf[...] | 340 | idone++; /* no "odone++" because we did not fill obuf[...] */ |
| 341 | } | 341 | } |
| 342 | l->delay_buf[l->delay_buf_ptr++] = ibuf[chan]; | 342 | l->delay_buf[l->delay_buf_ptr++] = ibuf[chan]; |
| 343 | l->delay_buf_ptr %= l->delay_buf_size; | 343 | l->delay_buf_ptr %= l->delay_buf_size; |
| @@ -352,7 +352,7 @@ int st_compand_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 8 unmodified lines | |||
| 352 | /* | 352 | /* |
| 353 | * Drain out compander delay lines. | 353 | * Drain out compander delay lines. |
| 354 | */ | 354 | */ |
| 355 | int st_compand_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) | 355 | static int st_compand_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) |
| 356 | { | 356 | { |
| 357 | compand_t l = (compand_t) effp->priv; | 357 | compand_t l = (compand_t) effp->priv; |
| 358 | st_size_t done; | 358 | st_size_t done; |
| @@ -380,7 +380,7 @@ int st_compand_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) · 21 unmodified lines | |||
| 380 | /* | 380 | /* |
| 381 | * Clean up compander effect. | 381 | * Clean up compander effect. |
| 382 | */ | 382 | */ |
| 383 | int st_compand_stop(eff_t effp) | 383 | static int st_compand_stop(eff_t effp) |
| 384 | { | 384 | { |
| 385 | compand_t l = (compand_t) effp->priv; | 385 | compand_t l = (compand_t) effp->priv; |
| 386 | 386 | ||