• E
    build: add compiler attributes to virUUIDParse · 430156cf
    Eric Blake 提交于
    Coverity complained that most, but not all, clients of virUUIDParse
    were checking for errors.  Silence those coverity warnings by
    explicitly marking the cases where we trust the input, and fixing
    one instance that really should have been checking.  In particular,
    this silences a rather large percentage of the warnings I saw on my
    most recent Coverity analysis run.
    
    * src/util/uuid.h (virUUIDParse): Enforce rules.
    * src/util/uuid.c (virUUIDParse): Drop impossible check; at least
    Coverity will detect if we break rules and pass NULL.
    * src/xenapi/xenapi_driver.c (xenapiDomainCreateXML)
    (xenapiDomainLookupByID, xenapiDomainLookupByName)
    (xenapiDomainDefineXML): Ignore return when we trust data source.
    * src/vbox/vbox_tmpl.c (nsIDtoChar, vboxIIDToUUID_v3_x)
    (vboxCallbackOnMachineStateChange)
    (vboxCallbackOnMachineRegistered, vboxStoragePoolLookupByName):
    Likewise.
    * src/node_device/node_device_hal.c (gather_system_cap): Likewise.
    * src/xenxs/xen_sxpr.c (xenParseSxpr): Check for errors.
    430156cf
xenapi_driver.c 61.8 KB