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

Unified · Split

src/cvsd.c+11−11
@@ -153,7 +153,7 @@ static void cvsdstartcommon(ft_t ft) · 152 unmodified lines
153 153
154/* ---------------------------------------------------------------------- */154/* ---------------------------------------------------------------------- */
155 155
156int st_cvsdstartread(ft_t ft) 156static int st_cvsdstartread(ft_t ft)
157{157{
158 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;158 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;
159 float *fp1;159 float *fp1;
@@ -179,7 +179,7 @@ int st_cvsdstartread(ft_t ft) · 19 unmodified lines
179 179
180/* ---------------------------------------------------------------------- */180/* ---------------------------------------------------------------------- */
181 181
182int st_cvsdstartwrite(ft_t ft) 182static int st_cvsdstartwrite(ft_t ft)
183{183{
184 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;184 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;
185 float *fp1;185 float *fp1;
@@ -201,7 +201,7 @@ int st_cvsdstartwrite(ft_t ft) · 15 unmodified lines
201 201
202/* ---------------------------------------------------------------------- */202/* ---------------------------------------------------------------------- */
203 203
204int st_cvsdstopwrite(ft_t ft)204static int st_cvsdstopwrite(ft_t ft)
205{205{
206 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;206 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;
207 207
@@ -217,7 +217,7 @@ int st_cvsdstopwrite(ft_t ft) · 9 unmodified lines
217 217
218/* ---------------------------------------------------------------------- */218/* ---------------------------------------------------------------------- */
219 219
220int st_cvsdstopread(ft_t ft)220static int st_cvsdstopread(ft_t ft)
221{221{
222 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;222 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;
223 223
@@ -229,10 +229,10 @@ int st_cvsdstopread(ft_t ft) · 5 unmodified lines
229 229
230/* ---------------------------------------------------------------------- */230/* ---------------------------------------------------------------------- */
231 231
232st_ssize_t st_cvsdread(ft_t ft, st_sample_t *buf, st_size_t nsamp) 232static st_size_t st_cvsdread(ft_t ft, st_sample_t *buf, st_size_t nsamp)
233{233{
234 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;234 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;
235 int done = 0;235 st_size_t done = 0;
236 float oval;236 float oval;
237 237
238 while (done < nsamp) {238 while (done < nsamp) {
@@ -288,10 +288,10 @@ st_ssize_t st_cvsdread(ft_t ft, st_sample_t *buf, st_size_t nsamp) · 49 unmodified lines
288 288
289/* ---------------------------------------------------------------------- */289/* ---------------------------------------------------------------------- */
290 290
291st_ssize_t st_cvsdwrite(ft_t ft, const st_sample_t *buf, st_size_t nsamp) 291static st_size_t st_cvsdwrite(ft_t ft, const st_sample_t *buf, st_size_t nsamp)
292{292{
293 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;293 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;
294 int done = 0;294 st_size_t done = 0;
295 float inval;295 float inval;
296 296
297 for(;;) {297 for(;;) {
@@ -519,7 +519,7 @@ static void make_dvms_hdr(ft_t ft, struct dvms_header *hdr) · 221 unmodified lines
519 519
520/* ---------------------------------------------------------------------- */520/* ---------------------------------------------------------------------- */
521 521
522int st_dvmsstartread(ft_t ft) 522static int st_dvmsstartread(ft_t ft)
523{523{
524 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;524 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;
525 struct dvms_header hdr;525 struct dvms_header hdr;
@@ -558,7 +558,7 @@ int st_dvmsstartread(ft_t ft) · 32 unmodified lines
558 558
559/* ---------------------------------------------------------------------- */559/* ---------------------------------------------------------------------- */
560 560
561int st_dvmsstartwrite(ft_t ft) 561static int st_dvmsstartwrite(ft_t ft)
562{562{
563 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;563 struct cvsdpriv *p = (struct cvsdpriv *) ft->priv;
564 struct dvms_header hdr;564 struct dvms_header hdr;
@@ -584,7 +584,7 @@ int st_dvmsstartwrite(ft_t ft) · 19 unmodified lines
584 584
585/* ---------------------------------------------------------------------- */585/* ---------------------------------------------------------------------- */
586 586
587int st_dvmsstopwrite(ft_t ft)587static int st_dvmsstopwrite(ft_t ft)
588{588{
589 struct dvms_header hdr;589 struct dvms_header hdr;
590 int rc;590 int rc;

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