To support this change, turn on lots more compiler warnings, and fix all the warnings generated.
Showing the changes to src/filter.c (1 of 93 files). Show all
Unified · Split
| @@ -54,7 +54,7 @@ static void FiltWin(filter_t f, long Nx); · 53 unmodified lines | ||
| 54 | 54 | /* |
| 55 | 55 | * Process options |
| 56 | 56 | */ |
| 57 | −int st_filter_getopts(eff_t effp, int n, char **argv) | |
| 57 | +static int st_filter_getopts(eff_t effp, int n, char **argv) | |
| 58 | 58 | { |
| 59 | 59 | filter_t f = (filter_t) effp->priv; |
| 60 | 60 | |
| @@ -104,7 +104,7 @@ int st_filter_getopts(eff_t effp, int n, char **argv) · 43 unmodified lines | ||
| 104 | 104 | /* |
| 105 | 105 | * Prepare processing. |
| 106 | 106 | */ |
| 107 | −int st_filter_start(eff_t effp) | |
| 107 | +static int st_filter_start(eff_t effp) | |
| 108 | 108 | { |
| 109 | 109 | filter_t f = (filter_t) effp->priv; |
| 110 | 110 | double *Fp0, *Fp1; |
| @@ -114,7 +114,7 @@ int st_filter_start(eff_t effp) · 3 unmodified lines | ||
| 114 | 114 | f->rate = effp->ininfo.rate; |
| 115 | 115 | |
| 116 | 116 | /* adjust upper frequency to Nyquist if necessary */ |
| 117 | − if (f->freq1 > f->rate/2 || f->freq1 <= 0) | |
| 117 | + if (f->freq1 > (st_sample_t)f->rate/2 || f->freq1 <= 0) | |
| 118 | 118 | f->freq1 = f->rate/2; |
| 119 | 119 | |
| 120 | 120 | if ((f->freq0 < 0) || (f->freq0 > f->freq1)) |
| @@ -126,7 +126,7 @@ int st_filter_start(eff_t effp) · 5 unmodified lines | ||
| 126 | 126 | |
| 127 | 127 | Xh = f->Nwin/2; |
| 128 | 128 | Fp0 = (double *) malloc(sizeof(double) * (Xh + 2)) + 1; |
| 129 | − if (f->freq0 > f->rate/200) { | |
| 129 | + if (f->freq0 > (st_sample_t)f->rate/200) { | |
| 130 | 130 | Xh0 = makeFilter(Fp0, Xh, 2.0*(double)f->freq0/f->rate, f->beta, 1, 0); |
| 131 | 131 | if (Xh0 <= 1) |
| 132 | 132 | { |
| @@ -138,7 +138,7 @@ int st_filter_start(eff_t effp) · 5 unmodified lines | ||
| 138 | 138 | } |
| 139 | 139 | Fp1 = (double *) malloc(sizeof(double) * (Xh + 2)) + 1; |
| 140 | 140 | /* need Fp[-1] and Fp[Xh] for makeFilter */ |
| 141 | − if (f->freq1 < f->rate/2) { | |
| 141 | + if (f->freq1 < (st_sample_t)f->rate/2) { | |
| 142 | 142 | Xh1 = makeFilter(Fp1, Xh, 2.0*(double)f->freq1/f->rate, f->beta, 1, 0); |
| 143 | 143 | if (Xh1 <= 1) |
| 144 | 144 | { |
| @@ -182,11 +182,11 @@ int st_filter_start(eff_t effp) · 37 unmodified lines | ||
| 182 | 182 | * Processed signed long samples from ibuf to obuf. |
| 183 | 183 | * Return number of samples processed. |
| 184 | 184 | */ |
| 185 | −int st_filter_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, | |
| 185 | +static int st_filter_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, | |
| 186 | 186 | st_size_t *isamp, st_size_t *osamp) |
| 187 | 187 | { |
| 188 | 188 | filter_t f = (filter_t) effp->priv; |
| 189 | − long i, Nx, Nproc; | |
| 189 | + st_size_t i, Nx, Nproc; | |
| 190 | 190 | |
| 191 | 191 | /* constrain amount we actually process */ |
| 192 | 192 | /* st_debug("Xh %d, Xt %d, isamp %d, ",f->Xh, f->Xt, *isamp); */ |
| @@ -234,7 +234,7 @@ int st_filter_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 41 unmodified lines | ||
| 234 | 234 | /* |
| 235 | 235 | * Process tail of input samples. |
| 236 | 236 | */ |
| 237 | −int st_filter_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) | |
| 237 | +static int st_filter_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) | |
| 238 | 238 | { |
| 239 | 239 | filter_t f = (filter_t) effp->priv; |
| 240 | 240 | long isamp_res, osamp_res; |
| @@ -271,7 +271,7 @@ int st_filter_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) · 30 unmodified lines | ||
| 271 | 271 | * Do anything required when you stop reading samples. |
| 272 | 272 | * Don't close input file! |
| 273 | 273 | */ |
| 274 | −int st_filter_stop(eff_t effp) | |
| 274 | +static int st_filter_stop(eff_t effp) | |
| 275 | 275 | { |
| 276 | 276 | filter_t f = (filter_t) effp->priv; |
| 277 | 277 | |