fix some compiler warnings

This commit is contained in:
Wim Taymans 2017-07-04 12:21:01 +02:00
parent 65d17ab6fe
commit da94f65493
6 changed files with 29 additions and 12 deletions

View file

@ -481,7 +481,8 @@ static void alsa_on_playback_timeout_event(struct spa_source *source)
snd_pcm_status_t *status;
snd_htimestamp_t htstamp;
read(state->timerfd, &exp, sizeof(uint64_t));
if (read(state->timerfd, &exp, sizeof(uint64_t)) != sizeof(uint64_t))
spa_log_warn(state->log, "error reading timerfd: %s", strerror(errno));
snd_pcm_status_alloca(&status);
@ -566,7 +567,8 @@ static void alsa_on_capture_timeout_event(struct spa_source *source)
snd_pcm_status_t *status;
snd_htimestamp_t htstamp;
read(state->timerfd, &exp, sizeof(uint64_t));
if (read(state->timerfd, &exp, sizeof(uint64_t)) != sizeof(uint64_t))
spa_log_warn(state->log, "error reading timerfd: %s", strerror(errno));
snd_pcm_status_alloca(&status);

View file

@ -94,7 +94,8 @@ impl_log_logv(struct spa_log *log,
index & impl->trace_rb.mask, location, size);
spa_ringbuffer_write_update(&impl->trace_rb, index + size);
write(impl->source.fd, &count, sizeof(uint64_t));
if (write(impl->source.fd, &count, sizeof(uint64_t)) != sizeof(uint64_t))
fprintf(stderr, "error signaling eventfd: %s\n", strerror(errno));
} else
fputs(location, stderr);
}