[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2 03/10] Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command



On 07/11/2013 08:05 AM, Michal Privoznik wrote:
> On 08.07.2013 21:20, John Ferlan wrote:
>> Add a new qemuMonitorJSONSetObjectProperty() method to support invocation
>> of the 'qom-set' JSON monitor command with a provided path, property, and
>> expected data type to set.
>>
>> The test code uses the same "/machine/i440fx" property as the get test and
>> attempts to set the "realized" property to "true" (which it should be set
>> at anyway).
>> ---
>> +    switch (prop->type) {
> 
> Again, this should be:
> 
> 
> switch ((qemuMonitorJSONObjectPropertyType) prop->type) {
> 

>> +    case QEMU_MONITOR_OBJECT_PROPERTY_STRING:
>> +        MAKE_SET_CMD("s:value", prop->val.str);
>> +        break;
>> +    case QEMU_MONITOR_OBJECT_PROPERTY_LAST:
>> +    default:
> 
> With these removed.

For the gcc enforcement of complete coverage of the enum, you have to
list the _LAST but drop the default:.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]