• E
    maint: enforce use of _LAST marker · bb69630b
    Eric Blake 提交于
    When converting a linear enum to a string, we have checks in
    place in the VIR_ENUM_IMPL macro to ensure that there is one
    string for every value, which lets us quickly flag if a user
    added a value but forgot to add a counterpart string.  However,
    this only works if we use the _LAST marker.
    
    * cfg.mk (sc_require_enum_last_marker): New syntax check.
    * src/conf/domain_conf.h (virDomainSnapshotState): Add new marker.
    * src/conf/domain_conf.c (virDomainSnapshotState): Fix offender.
    * src/qemu/qemu_monitor_json.c (qemuMonitorWatchdogAction)
    (qemuMonitorIOErrorAction, qemuMonitorGraphicsAddressFamily):
    Likewise.
    * src/util/virtypedparam.c (virTypedParameter): Likewise.
    bb69630b
cfg.mk 27.0 KB