To support this change, turn on lots more compiler warnings, and fix all the warnings generated.
Showing the changes to src/deemphas.c (1 of 93 files). Show all
Unified · Split
| @@ -112,22 +112,6 @@ typedef struct deemphstuff { · 111 unmodified lines | ||
| 112 | 112 | assert_static(sizeof(struct deemphstuff) <= ST_MAX_EFFECT_PRIVSIZE, |
| 113 | 113 | /* else */ deemph_PRIVSIZE_too_big); |
| 114 | 114 | |
| 115 | −/* | |
| 116 | − * Process options | |
| 117 | − * | |
| 118 | − * Don't do initialization now. | |
| 119 | − * The 'info' fields are not yet filled in. | |
| 120 | − */ | |
| 121 | −int st_deemph_getopts(eff_t effp, int n, char **argv) | |
| 122 | −{ | |
| 123 | − if (n) | |
| 124 | − { | |
| 125 | − st_fail(st_deemph_effect.usage); | |
| 126 | − return (ST_EOF); | |
| 127 | − } | |
| 128 | − return (ST_SUCCESS); | |
| 129 | −} | |
| 130 | − | |
| 131 | 115 | /* filter coefficients */ |
| 132 | 116 | #define a1 -0.62786881719628784282 |
| 133 | 117 | #define b0 0.45995451989513153057 |
| @@ -137,7 +121,7 @@ int st_deemph_getopts(eff_t effp, int n, char **argv) · 3 unmodified lines | ||
| 137 | 121 | * Prepare processing. |
| 138 | 122 | * Do all initializations. |
| 139 | 123 | */ |
| 140 | −int st_deemph_start(eff_t effp) | |
| 124 | +static int st_deemph_start(eff_t effp) | |
| 141 | 125 | { |
| 142 | 126 | /* check the input format */ |
| 143 | 127 | |
| @@ -188,7 +172,7 @@ int st_deemph_start(eff_t effp) · 44 unmodified lines | ||
| 188 | 172 | * Return number of samples processed. |
| 189 | 173 | */ |
| 190 | 174 | |
| 191 | −int st_deemph_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, | |
| 175 | +static int st_deemph_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, | |
| 192 | 176 | st_size_t *isamp, st_size_t *osamp) |
| 193 | 177 | { |
| 194 | 178 | deemph_t deemph = (deemph_t) effp->priv; |
| @@ -208,35 +192,15 @@ int st_deemph_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 13 unmodified lines | ||
| 208 | 192 | return (ST_SUCCESS); |
| 209 | 193 | } |
| 210 | 194 | |
| 211 | −/* | |
| 212 | − * Drain out remaining samples if the effect generates any. | |
| 213 | − */ | |
| 214 | − | |
| 215 | −int st_deemph_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) | |
| 216 | −{ | |
| 217 | − /* nothing to do */ | |
| 218 | − return (ST_EOF); | |
| 219 | −} | |
| 220 | − | |
| 221 | −/* | |
| 222 | − * Do anything required when you stop reading samples. | |
| 223 | − * (free allocated memory, etc.) | |
| 224 | − */ | |
| 225 | −int st_deemph_stop(eff_t effp) | |
| 226 | −{ | |
| 227 | − /* nothing to do */ | |
| 228 | − return (ST_SUCCESS); | |
| 229 | −} | |
| 230 | − | |
| 231 | 195 | static st_effect_t st_deemph_effect = { |
| 232 | 196 | "deemph", |
| 233 | 197 | "Usage: Deemphasis filtering effect takes no options", |
| 234 | 198 | 0, |
| 235 | − st_deemph_getopts, | |
| 199 | + st_effect_nothing_getopts, | |
| 236 | 200 | st_deemph_start, |
| 237 | 201 | st_deemph_flow, |
| 238 | 202 | st_effect_nothing_drain, |
| 239 | − st_deemph_stop | |
| 203 | + st_effect_nothing | |
| 240 | 204 | }; |
| 241 | 205 | |
| 242 | 206 | const st_effect_t *st_deemph_effect_fn(void) |