History

Fix read and write return types: now st_size_t, like the size inputs.

To support this change, turn on lots more compiler warnings, and fix all the warnings generated.

rrt committed 19 years ago

Commit 4d743c41 parent ce1f8f393 files · +875 −1236Browse files

Showing the changes to src/stat.c (1 of 93 files). Show all

Unified · Split

src/stat.c+5−5
@@ -45,7 +45,7 @@ typedef struct statstuff { · 44 unmodified lines
45/*45/*
46 * Process options46 * Process options
47 */47 */
48int st_stat_getopts(eff_t effp, int n, char **argv)48static int st_stat_getopts(eff_t effp, int n, char **argv)
49{49{
50 stat_t stat = (stat_t) effp->priv;50 stat_t stat = (stat_t) effp->priv;
51 51
@@ -96,7 +96,7 @@ int st_stat_getopts(eff_t effp, int n, char **argv) · 44 unmodified lines
96/*96/*
97 * Prepare processing.97 * Prepare processing.
98 */98 */
99int st_stat_start(eff_t effp)99static int st_stat_start(eff_t effp)
100{100{
101 stat_t stat = (stat_t) effp->priv;101 stat_t stat = (stat_t) effp->priv;
102 int i;102 int i;
@@ -152,7 +152,7 @@ static void print_power_spectrum(unsigned samples, float rate, float *re_in, flo · 49 unmodified lines
152 * Return number of samples processed.152 * Return number of samples processed.
153 */153 */
154 154
155int st_stat_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf,155static int st_stat_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf,
156 st_size_t *isamp, st_size_t *osamp)156 st_size_t *isamp, st_size_t *osamp)
157{157{
158 stat_t stat = (stat_t) effp->priv;158 stat_t stat = (stat_t) effp->priv;
@@ -231,7 +231,7 @@ int st_stat_flow(eff_t effp, const st_sample_t *ibuf, st_sample_t *obuf, · 72 unmodified lines
231/*231/*
232 * Process tail of input samples.232 * Process tail of input samples.
233 */233 */
234int st_stat_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp)234static int st_stat_drain(eff_t effp, st_sample_t *obuf UNUSED, st_size_t *osamp)
235{235{
236 stat_t stat = (stat_t) effp->priv;236 stat_t stat = (stat_t) effp->priv;
237 237
@@ -256,7 +256,7 @@ int st_stat_drain(eff_t effp, st_sample_t *obuf, st_size_t *osamp) · 18 unmodified lines
256 * Do anything required when you stop reading samples.256 * Do anything required when you stop reading samples.
257 * Don't close input file!257 * Don't close input file!
258 */258 */
259int st_stat_stop(eff_t effp)259static int st_stat_stop(eff_t effp)
260{260{
261 stat_t stat = (stat_t) effp->priv;261 stat_t stat = (stat_t) effp->priv;
262 double amp, scale, rms = 0, freq;262 double amp, scale, rms = 0, freq;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t