1. 03 4月, 2019 20 次提交
  2. 01 4月, 2019 6 次提交
  3. 30 3月, 2019 1 次提交
  4. 29 3月, 2019 4 次提交
  5. 28 3月, 2019 8 次提交
  6. 27 3月, 2019 1 次提交
    • E
      Revert "snapshot: Allow NULL to virDomainSnapshotObjGetDef" · a6d822ce
      Eric Blake 提交于
      This reverts commit 6b90a847.
      
      It turns out gcc -O2 is not happy with it, complaining:
      
      /home/pipo/libvirt/src/qemu/qemu_driver.c: In function 'qemuDomainSnapshotCreateXML':
      /home/pipo/libvirt/src/qemu/qemu_driver.c:15389:26: error: potential null pointer dereference [-Werror=null-dereference]
           bool memory = snapdef->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL;
                         ~~~~~~~^~~~~~~~
      /home/pipo/libvirt/src/qemu/qemu_driver.c:15389:26: error: potential null pointer dereference [-Werror=null-dereference]
      In file included from /home/pipo/libvirt/src/util/virbuffer.h:27,
                       from /home/pipo/libvirt/src/conf/capabilities.h:27,
                       from /home/pipo/libvirt/src/conf/domain_conf.h:32,
                       from /home/pipo/libvirt/src/qemu/qemu_agent.h:26,
                       from /home/pipo/libvirt/src/qemu/qemu_driver.c:40:
      /home/pipo/libvirt/src/util/viralloc.h:125:34: error: potential null pointer dereference [-Werror=null-dereference]
       # define VIR_ALLOC_N(ptr, count) virAllocN(&(ptr), sizeof(*(ptr)), (count), true, \
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                  VIR_FROM_THIS, __FILE__, __FUNCTION__, __LINE__)
                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/pipo/libvirt/src/qemu/qemu_driver.c:15103:9: note: in expansion of macro 'VIR_ALLOC_N'
           if (VIR_ALLOC_N(ret, snapdef->ndisks) < 0)
               ^~~~~~~~~~~
      /home/pipo/libvirt/src/qemu/qemu_driver.c:15798:45: error: null pointer dereference [-Werror=null-dereference]
                   virDomainSnapshotObjGetDef(snap)->memory == VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL) {
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
      
      As the patch simplified one or two callers at the risk of making
      many other callers now candidates to trigger aggressive compiler
      warnings, it isn't worth it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a6d822ce