summaryrefslogtreecommitdiffstats
path: root/src/modules/oss-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-08-19 22:39:54 +0200
committerLennart Poettering <lennart@poettering.net>2008-08-19 22:39:54 +0200
commitb7026bf248948a6a30386ddbcc137f48f369a51e (patch)
tree0941ba3f61298fd9b8cb5b34fc236248519b0c8f /src/modules/oss-util.c
parent047eb52b521a61aef54bd1760b5470a963ea47b6 (diff)
add a few more gcc warning flags and fix quite a few problems found by doing so
Diffstat (limited to 'src/modules/oss-util.c')
-rw-r--r--src/modules/oss-util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/oss-util.c b/src/modules/oss-util.c
index 2791e165..f766030d 100644
--- a/src/modules/oss-util.c
+++ b/src/modules/oss-util.c
@@ -204,10 +204,10 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
if (ss->channels != channels) {
pa_log_warn("device doesn't support %i channels, using %i channels.", ss->channels, channels);
- ss->channels = channels;
+ ss->channels = (uint8_t) channels;
}
- speed = ss->rate;
+ speed = (int) ss->rate;
if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) < 0) {
pa_log("SNDCTL_DSP_SPEED: %s", pa_cstrerror(errno));
return -1;
@@ -219,7 +219,7 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) {
/* If the sample rate deviates too much, we need to resample */
if (speed < ss->rate*.95 || speed > ss->rate*1.05)
- ss->rate = speed;
+ ss->rate = (uint32_t) speed;
}
return 0;