To support this change, turn on lots more compiler warnings, and fix all the warnings generated.
Showing the changes to src/polyphas.c (1 of 93 files). Show all
Unified · Split
| @@ -80,7 +80,7 @@ static int win_type = 0; · 79 unmodified lines | |||
| 80 | static int win_width = 1024; | 80 | static int win_width = 1024; |
| 81 | static Float cutoff = 0.95; | 81 | static Float cutoff = 0.95; |
| 82 | 82 | ||
| 83 | int st_poly_getopts(eff_t effp, int n, char **argv) | 83 | static int st_poly_getopts(eff_t effp UNUSED, int n, char **argv) |
| 84 | { | 84 | { |
| 85 | /* 0: nuttall | 85 | /* 0: nuttall |
| 86 | 1: hamming */ | 86 | 1: hamming */ |
| @@ -179,9 +179,9 @@ static int prime(int n, int *q0) · 92 unmodified lines | |||
| 179 | return (q-q0); | 179 | return (q-q0); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | static int permute(int *m, int *l, int ct, int ct1, int amalg) | 182 | static int permute(int *m, int *l, int ct, int ct1, size_t amalg) |
| 183 | { | 183 | { |
| 184 | int k, n; | 184 | size_t k, n; |
| 185 | int *p; | 185 | int *p; |
| 186 | int *q; | 186 | int *q; |
| 187 | 187 | ||
| @@ -221,7 +221,7 @@ static int permute(int *m, int *l, int ct, int ct1, int amalg) · 33 unmodified lines | |||
| 221 | static int optimize_factors(int numer, int denom, int *l1, int *l2) | 221 | static int optimize_factors(int numer, int denom, int *l1, int *l2) |
| 222 | { | 222 | { |
| 223 | int f_min,c_min,u_min,ct1,ct2; | 223 | int f_min,c_min,u_min,ct1,ct2; |
| 224 | int amalg; | 224 | size_t amalg; |
| 225 | int k; | 225 | int k; |
| 226 | static int m1[MF],m2[MF]; | 226 | static int m1[MF],m2[MF]; |
| 227 | static int b1[MF],b2[MF]; | 227 | static int b1[MF],b2[MF]; |
| @@ -239,7 +239,7 @@ static int optimize_factors(int numer, int denom, int *l1, int *l2) · 11 unmodified lines | |||
| 239 | ct1 = prime(numer,l1); | 239 | ct1 = prime(numer,l1); |
| 240 | ct2 = prime(denom,l2); | 240 | ct2 = prime(denom,l2); |
| 241 | 241 | ||
| 242 | for (amalg = max(9,l2[0]); amalg<= 9+l2[ct2-1]; amalg++) { | 242 | for (amalg = max(9,l2[0]); amalg <= (size_t)(9+l2[ct2-1]); amalg++) { |
| 243 | for (k = 0; k<100000; k++) { | 243 | for (k = 0; k<100000; k++) { |
| 244 | int u,u1,u2,j,f,cost; | 244 | int u,u1,u2,j,f,cost; |
| 245 | cost = 0; | 245 | cost = 0; |
| @@ -369,7 +369,7 @@ static void fir_design(Float *buffer, int length, Float cutoff) · 123 unmodified lines | |||
| 369 | 369 | ||
| 370 | #define RIBLEN 2048 | 370 | #define RIBLEN 2048 |
| 371 | 371 | ||
| 372 | int st_poly_start(eff_t effp) | 372 | static int st_poly_start(eff_t effp) |
| 373 | { | 373 | { |
| 374 | poly_t rate = (poly_t) effp->priv; | 374 | poly_t rate = (poly_t) effp->priv; |
| 375 | static int l1[MF], l2[MF]; | 375 | static int l1[MF], l2[MF]; |
| @@ -523,7 +523,7 @@ static void update_hist(Float *hist, int hist_size, int in_size) · 147 unmodified lines | |||
| 523 | 523 | ||
| 524 | } | 524 | } |
| 525 | 525 | ||
| 526 | int st_poly_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, | 526 | static int st_poly_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, |
| 527 | st_size_t *isamp, st_size_t *osamp) | 527 | st_size_t *isamp, st_size_t *osamp) |
| 528 | { | 528 | { |
| 529 | poly_t rate = (poly_t) effp->priv; | 529 | poly_t rate = (poly_t) effp->priv; |
| @@ -534,7 +534,7 @@ int st_poly_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 4 unmodified lines | |||
| 534 | s0 = rate->stage[0]; /* the first stage */ | 534 | s0 = rate->stage[0]; /* the first stage */ |
| 535 | s1 = rate->stage[rate->total]; /* the 'last' stage is output buffer */ | 535 | s1 = rate->stage[rate->total]; /* the 'last' stage is output buffer */ |
| 536 | { | 536 | { |
| 537 | int in_size, gap, k; | 537 | st_size_t in_size, gap, k; |
| 538 | 538 | ||
| 539 | in_size = *isamp; | 539 | in_size = *isamp; |
| 540 | gap = s0->size - s0->held; /* space available in this 'input' buffer */ | 540 | gap = s0->size - s0->held; /* space available in this 'input' buffer */ |
| @@ -558,7 +558,7 @@ int st_poly_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 17 unmodified lines | |||
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | if (s0->held == s0->size && s1->held == 0) { | 560 | if (s0->held == s0->size && s1->held == 0) { |
| 561 | int k; | 561 | st_size_t k; |
| 562 | /* input buffer full, output buffer empty, so do process */ | 562 | /* input buffer full, output buffer empty, so do process */ |
| 563 | 563 | ||
| 564 | for(k=0; k<rate->total; k++) { | 564 | for(k=0; k<rate->total; k++) { |
| @@ -587,7 +587,7 @@ int st_poly_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 22 unmodified lines | |||
| 587 | st_size_t out_size; | 587 | st_size_t out_size; |
| 588 | st_size_t oskip; | 588 | st_size_t oskip; |
| 589 | Float *out_buf; | 589 | Float *out_buf; |
| 590 | int k; | 590 | st_size_t k; |
| 591 | 591 | ||
| 592 | oskip = rate->oskip; | 592 | oskip = rate->oskip; |
| 593 | out_size = s1->held; | 593 | out_size = s1->held; |
| @@ -626,7 +626,7 @@ int st_poly_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 32 unmodified lines | |||
| 626 | /* | 626 | /* |
| 627 | * Process tail of input samples. | 627 | * Process tail of input samples. |
| 628 | */ | 628 | */ |
| 629 | int st_poly_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) | 629 | static int st_poly_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) |
| 630 | { | 630 | { |
| 631 | st_size_t in_size; | 631 | st_size_t in_size; |
| 632 | /* Call "flow" with NULL input. */ | 632 | /* Call "flow" with NULL input. */ |
| @@ -638,11 +638,11 @@ int st_poly_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) · 5 unmodified lines | |||
| 638 | * Do anything required when you stop reading samples. | 638 | * Do anything required when you stop reading samples. |
| 639 | * Don't close input file! | 639 | * Don't close input file! |
| 640 | */ | 640 | */ |
| 641 | int st_poly_stop(eff_t effp) | 641 | static int st_poly_stop(eff_t effp) |
| 642 | { | 642 | { |
| 643 | poly_t rate = (poly_t) effp->priv; | 643 | poly_t rate = (poly_t) effp->priv; |
| 644 | polystage *s; | 644 | polystage *s; |
| 645 | int k; | 645 | st_size_t k; |
| 646 | 646 | ||
| 647 | for(k = 0; k <= rate->total; k++) { | 647 | for(k = 0; k <= rate->total; k++) { |
| 648 | s = rate->stage[k]; | 648 | s = rate->stage[k]; |