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
39 * mono/stereo/quad.39 * mono/stereo/quad.
40 */40 */
41 41
42int st_cdrstartread(ft_t ft) 42static int st_cdrstartread(ft_t ft)
43{43{
44 int rc;44 int rc;
45 45
@@ -78,7 +78,7 @@ int st_cdrstartread(ft_t ft) · 32 unmodified lines
78 * Return number of samples read.78 * Return number of samples read.
79 */79 */
80 80
81st_ssize_t st_cdrread(ft_t ft, st_sample_t *buf, st_size_t len) 81static st_size_t st_cdrread(ft_t ft, st_sample_t *buf, st_size_t len)
82{82{
83 83
84 return st_rawread(ft, buf, len);84 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
88 * Do anything required when you stop reading samples. 88 * Do anything required when you stop reading samples.
89 * Don't close input file! 89 * Don't close input file!
90 */90 */
91int st_cdrstopread(ft_t ft) 91static int st_cdrstopread(ft_t ft)
92{92{
93 /* Needed because of rawread() */93 /* Needed because of rawread() */
94 return st_rawstopread(ft);94 return st_rawstopread(ft);
95}95}
96 96
97int st_cdrstartwrite(ft_t ft) 97static int st_cdrstartwrite(ft_t ft)
98{98{
99 cdr_t cdr = (cdr_t) ft->priv;99 cdr_t cdr = (cdr_t) ft->priv;
100 int rc;100 int rc;
@@ -121,7 +121,7 @@ int st_cdrstartwrite(ft_t ft) · 20 unmodified lines
121 return(ST_SUCCESS);121 return(ST_SUCCESS);
122}122}
123 123
124st_ssize_t st_cdrwrite(ft_t ft, const st_sample_t *buf, st_size_t len) 124static st_size_t st_cdrwrite(ft_t ft, const st_sample_t *buf, st_size_t len)
125{125{
126 cdr_t cdr = (cdr_t) ft->priv;126 cdr_t cdr = (cdr_t) ft->priv;
127 127
@@ -135,7 +135,7 @@ st_ssize_t st_cdrwrite(ft_t ft, const st_sample_t *buf, st_size_t len) · 7 unmodified lines
135 * samples. We write -32768 for each sample to pad it out.135 * samples. We write -32768 for each sample to pad it out.
136 */136 */
137 137
138int st_cdrstopwrite(ft_t ft) 138static int st_cdrstopwrite(ft_t ft)
139{139{
140 cdr_t cdr = (cdr_t) ft->priv;140 cdr_t cdr = (cdr_t) ft->priv;
141 int padsamps = SECTORSIZE - (cdr->samples % SECTORSIZE);141 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