explicitly downcast
Tools like "sparse" check for missing downcasts, since implicit cast may be dangerous. Although that does not change the compiler result, it may make the code more readable (IMHO), because you always see when there may be data cut off. git-svn-id: https://svn.musicpd.org/mpd/trunk@7196 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
committed by
Eric Wong
parent
13c17c3d94
commit
66fe580642
@@ -215,7 +215,7 @@ configure_hw:
|
||||
snd_strerror(-err));
|
||||
goto fail;
|
||||
}
|
||||
audioFormat->channels = channels;
|
||||
audioFormat->channels = (mpd_sint8)channels;
|
||||
|
||||
err = snd_pcm_hw_params_set_rate_near(ad->pcmHandle, hwparams,
|
||||
&sampleRate, NULL);
|
||||
|
||||
@@ -485,9 +485,9 @@ static int oss_openDevice(AudioOutput * audioOutput)
|
||||
OssData *od = audioOutput->data;
|
||||
AudioFormat *audioFormat = &audioOutput->outAudioFormat;
|
||||
|
||||
od->channels = audioFormat->channels;
|
||||
od->channels = (mpd_sint8)audioFormat->channels;
|
||||
od->sampleRate = audioFormat->sampleRate;
|
||||
od->bits = audioFormat->bits;
|
||||
od->bits = (mpd_sint8)audioFormat->bits;
|
||||
|
||||
if ((ret = oss_open(audioOutput)) < 0)
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user