-/* $Id$ */
-
/***
This file is part of PulseAudio.
ret += r;
data = (const uint8_t*) data + r;
- size -= r;
+ size -= (size_t) r;
}
return ret;
}
-int main(PA_GCC_UNUSED int argc, char*argv[]) {
+int main(int argc, char*argv[]) {
/* The sample type to use */
static const pa_sample_spec ss = {
.format = PA_SAMPLE_S16LE,
for (;;) {
uint8_t buf[BUFSIZE];
- ssize_t r;
/* Record some data ... */
if (pa_simple_read(s, buf, sizeof(buf), &error) < 0) {
}
/* And write it to STDOUT */
- if ((r = loop_write(STDOUT_FILENO, buf, sizeof(buf))) <= 0) {
+ if (loop_write(STDOUT_FILENO, buf, sizeof(buf)) != sizeof(buf)) {
fprintf(stderr, __FILE__": write() failed: %s\n", strerror(errno));
goto finish;
}