[libvirt] [PATCH 2/2] qemu: sound: Handle all possible sound cards in switch statement

Peter Krempa pkrempa at redhat.com
Mon Jul 28 08:32:24 UTC 2014


On 07/25/14 15:18, Ján Tomko wrote:
> On 07/25/2014 10:59 AM, Peter Krempa wrote:
>> Use correct type in the switch and handle all sound card models in it so
>> that the compliler tracks additions.
> 
> *compiler
> 
>> @@ -4712,6 +4706,15 @@ qemuBuildSoundDevStr(virDomainDefPtr def,
>>              goto error;
>>          }
>>          break;
>> +    case VIR_DOMAIN_SOUND_MODEL_SB16:
>> +        model = "sb16";
>> +        break;
>> +    case VIR_DOMAIN_SOUND_MODEL_PCSPK: /* pc-speaker is handled separately */
> 
> Did you mean to report an error for PC speaker too?
> 

The pc-speaker is formatted in the function above, so that statement
should never be reached at this point.

>> +    case VIR_DOMAIN_SOUND_MODEL_LAST:
>> +        virReportError(VIR_ERR_INTERNAL_ERROR,
>> +                       _("sound card model '%s' is not supported by qemu"),
>> +                       virDomainSoundModelTypeToString(sound->model));
> 
> Jan
> 


Peter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140728/26c5b43c/attachment-0001.sig>


More information about the libvir-list mailing list