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/cdr.c (1 of 93 files). Show all

Unified · Split

src/cdr.c+6−6
@@ -39,7 +39,7 @@ typedef struct cdrstuff { · 38 unmodified lines
3939 * mono/stereo/quad.
4040 */
4141
42−int st_cdrstartread(ft_t ft)
42+static int st_cdrstartread(ft_t ft)
4343 {
4444 int rc;
4545
@@ -78,7 +78,7 @@ int st_cdrstartread(ft_t ft) · 32 unmodified lines
7878 * Return number of samples read.
7979 */
8080
81−st_ssize_t st_cdrread(ft_t ft, st_sample_t *buf, st_size_t len)
81+static st_size_t st_cdrread(ft_t ft, st_sample_t *buf, st_size_t len)
8282 {
8383
8484 return st_rawread(ft, buf, len);
@@ -88,13 +88,13 @@ st_ssize_t st_cdrread(ft_t ft, st_sample_t *buf, st_size_t len) · 3 unmodified lines
8888 * Do anything required when you stop reading samples.
8989 * Don't close input file!
9090 */
91−int st_cdrstopread(ft_t ft)
91+static int st_cdrstopread(ft_t ft)
9292 {
9393 /* Needed because of rawread() */
9494 return st_rawstopread(ft);
9595 }
9696
97−int st_cdrstartwrite(ft_t ft)
97+static int st_cdrstartwrite(ft_t ft)
9898 {
9999 cdr_t cdr = (cdr_t) ft->priv;
100100 int rc;
@@ -121,7 +121,7 @@ int st_cdrstartwrite(ft_t ft) · 20 unmodified lines
121121 return(ST_SUCCESS);
122122 }
123123
124−st_ssize_t st_cdrwrite(ft_t ft, const st_sample_t *buf, st_size_t len)
124+static st_size_t st_cdrwrite(ft_t ft, const st_sample_t *buf, st_size_t len)
125125 {
126126 cdr_t cdr = (cdr_t) ft->priv;
127127
@@ -135,7 +135,7 @@ st_ssize_t st_cdrwrite(ft_t ft, const st_sample_t *buf, st_size_t len) · 7 unmodified lines
135135 * samples. We write -32768 for each sample to pad it out.
136136 */
137137
138−int st_cdrstopwrite(ft_t ft)
138+static int st_cdrstopwrite(ft_t ft)
139139 {
140140 cdr_t cdr = (cdr_t) ft->priv;
141141 int padsamps = SECTORSIZE - (cdr->samples % SECTORSIZE);

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