Fixed bugs detected by Intel compiler

This commit is contained in:
Jaroslav Kysela 2004-04-20 13:42:48 +00:00
parent a66204cd12
commit 2bad31bbf4
4 changed files with 21 additions and 21 deletions

View file

@ -53,7 +53,7 @@ static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, vo
{
int fd;
struct list_head *i;
assert(siginfo->si_code = SI_SIGIO);
assert(siginfo->si_code == SI_SIGIO);
fd = siginfo->si_fd;
list_for_each(i, &snd_async_handlers) {
snd_async_handler_t *h = list_entry(i, snd_async_handler_t, glist);

View file

@ -536,7 +536,7 @@ int snd_async_add_ctl_handler(snd_async_handler_t **handler, snd_ctl_t *ctl,
*/
snd_ctl_t *snd_async_handler_get_ctl(snd_async_handler_t *handler)
{
assert(handler->type = SND_ASYNC_HANDLER_CTL);
assert(handler->type == SND_ASYNC_HANDLER_CTL);
return handler->u.ctl;
}

View file

@ -638,10 +638,10 @@ static int load_iw_patch(snd_iwffff_handle_t *iwf, iwffff_instrument_t *instr,
gwave->format |= IWFFFF_WAVE_ROM;
gwave->address.memory = snd_LE_to_host_32(*(((unsigned int *)wave) + 8/4));
} else {
gwave->share_id[1] = iwf->share_id1;
gwave->share_id[2] = iwf->share_id2;
gwave->share_id[3] = iwf->share_id3;
gwave->share_id[4] = snd_LE_to_host_32(*(((unsigned int *)wave) + 8/4));
gwave->share_id[0] = iwf->share_id1;
gwave->share_id[1] = iwf->share_id2;
gwave->share_id[2] = iwf->share_id3;
gwave->share_id[3] = snd_LE_to_host_32(*(((unsigned int *)wave) + 8/4));
result = load_iw_wave(iwf, gwave->share_id[2], gwave->size, &gwave->address.ptr);
if (result < 0) {
free_wave(gwave);
@ -874,10 +874,10 @@ int snd_instr_iwffff_convert_to_stream(snd_instr_iwffff_t *iwffff,
xwave = (iwffff_xwave_t *)ptr;
ptr += sizeof(*xwave);
xwave->stype = IWFFFF_STRU_WAVE;
xwave->share_id[0] = __cpu_to_le32(wave->share_id[0]);
xwave->share_id[1] = __cpu_to_le32(wave->share_id[1]);
xwave->share_id[2] = __cpu_to_le32(wave->share_id[2]);
xwave->share_id[3] = __cpu_to_le32(wave->share_id[3]);
xwave->share_id[4] = __cpu_to_le32(wave->share_id[4]);
xwave->format = __cpu_to_le32(wave->format);
xwave->size = __cpu_to_le32(wave->size);
xwave->start = __cpu_to_le32(wave->start);

View file

@ -743,20 +743,20 @@ int snd_pcm_hw_params_current(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
if (!pcm->setup)
return -EBADFD;
memset(params, 0, snd_pcm_hw_params_sizeof());
snd_mask_copy(&params->masks[SND_PCM_HW_PARAM_ACCESS], (snd_mask_t *)&pcm->access);
snd_mask_copy(&params->masks[SND_PCM_HW_PARAM_FORMAT], (snd_mask_t *)&pcm->format);
snd_mask_copy(&params->masks[SND_PCM_HW_PARAM_SUBFORMAT], (snd_mask_t *)&pcm->subformat);
snd_mask_copy(&params->masks[SND_PCM_HW_PARAM_ACCESS - SNDRV_PCM_HW_PARAM_FIRST_MASK], (snd_mask_t *)&pcm->access);
snd_mask_copy(&params->masks[SND_PCM_HW_PARAM_FORMAT - SNDRV_PCM_HW_PARAM_FIRST_MASK], (snd_mask_t *)&pcm->format);
snd_mask_copy(&params->masks[SND_PCM_HW_PARAM_SUBFORMAT - SNDRV_PCM_HW_PARAM_FIRST_MASK], (snd_mask_t *)&pcm->subformat);
frame_bits = snd_pcm_format_physical_width(pcm->format) * pcm->channels;
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_FRAME_BITS], frame_bits);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_CHANNELS], pcm->channels);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_RATE], pcm->rate);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_PERIOD_TIME], pcm->period_time);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_PERIOD_SIZE], pcm->period_size);
snd_interval_copy(&params->intervals[SND_PCM_HW_PARAM_PERIODS], &pcm->periods);
snd_interval_copy(&params->intervals[SND_PCM_HW_PARAM_BUFFER_TIME], &pcm->buffer_time);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_BUFFER_SIZE], pcm->buffer_size);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_BUFFER_BYTES], (pcm->buffer_size * frame_bits) / 8);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_TICK_TIME], pcm->tick_time);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_FRAME_BITS - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], frame_bits);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_CHANNELS - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->channels);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_RATE - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->rate);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_PERIOD_TIME - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->period_time);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_PERIOD_SIZE - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->period_size);
snd_interval_copy(&params->intervals[SND_PCM_HW_PARAM_PERIODS - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], &pcm->periods);
snd_interval_copy(&params->intervals[SND_PCM_HW_PARAM_BUFFER_TIME - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], &pcm->buffer_time);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_BUFFER_SIZE - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->buffer_size);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_BUFFER_BYTES - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], (pcm->buffer_size * frame_bits) / 8);
snd_interval_set_value(&params->intervals[SND_PCM_HW_PARAM_TICK_TIME - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->tick_time);
params->info = pcm->info;
params->msbits = pcm->msbits;
params->rate_num = pcm->rate_num;
@ -1814,7 +1814,7 @@ int snd_async_add_pcm_handler(snd_async_handler_t **handler, snd_pcm_t *pcm,
*/
snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler)
{
assert(handler->type = SND_ASYNC_HANDLER_PCM);
assert(handler->type == SND_ASYNC_HANDLER_PCM);
return handler->u.pcm;
}