Use G_GNUC_FALLTHROUGH instead of ATTRIBUTE_FALLTHROUGH

Also define the macro for building with GLib older than 2.60

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2019-10-15 13:38:21 +02:00
parent dd3738acc4
commit 88131931b8
26 changed files with 56 additions and 55 deletions

View File

@ -629,7 +629,7 @@ sc_avoid_g_gnuc_unused_in_header:
$(_sc_search_regexp) $(_sc_search_regexp)
sc_prohibit_attribute_macros: sc_prohibit_attribute_macros:
@prohibit='ATTRIBUTE_(UNUSED|NORETURN|SENTINEL|RETURN_CHECK|NOINLINE|FMT_PRINTF)' \ @prohibit='ATTRIBUTE_(UNUSED|NORETURN|SENTINEL|RETURN_CHECK|NOINLINE|FMT_PRINTF|FALLTHROUGH)' \
in_vc_files='\.[ch]$$' \ in_vc_files='\.[ch]$$' \
halt='use GLib macros: G_GNUC_<ATTRIBUTE_SUFFIX> for most' \ halt='use GLib macros: G_GNUC_<ATTRIBUTE_SUFFIX> for most' \
$(_sc_search_regexp) $(_sc_search_regexp)

View File

@ -17486,7 +17486,7 @@ virDomainChrEquals(virDomainChrDefPtr src,
if (src->targetType != tgt->targetType) if (src->targetType != tgt->targetType)
return false; return false;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE: case VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE:
case VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL: case VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL:
@ -20290,7 +20290,7 @@ virDomainDefParseXML(xmlDocPtr xml,
def->apic_eoi = eoi; def->apic_eoi = eoi;
VIR_FREE(tmp); VIR_FREE(tmp);
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_ACPI:
case VIR_DOMAIN_FEATURE_PAE: case VIR_DOMAIN_FEATURE_PAE:
case VIR_DOMAIN_FEATURE_VIRIDIAN: case VIR_DOMAIN_FEATURE_VIRIDIAN:
@ -31205,7 +31205,7 @@ virDomainNetResolveActualType(virDomainNetDefPtr iface)
/* intentionally fall through to the direct case for /* intentionally fall through to the direct case for
* VIR_NETWORK_FORWARD_BRIDGE with no bridge device defined * VIR_NETWORK_FORWARD_BRIDGE with no bridge device defined
*/ */
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_NETWORK_FORWARD_PRIVATE: case VIR_NETWORK_FORWARD_PRIVATE:
case VIR_NETWORK_FORWARD_VEPA: case VIR_NETWORK_FORWARD_VEPA:
@ -31471,7 +31471,7 @@ virDomainDiskTranslateSourcePool(virDomainDiskDefPtr def)
case VIR_STORAGE_SOURCE_POOL_MODE_DEFAULT: case VIR_STORAGE_SOURCE_POOL_MODE_DEFAULT:
case VIR_STORAGE_SOURCE_POOL_MODE_LAST: case VIR_STORAGE_SOURCE_POOL_MODE_LAST:
def->src->srcpool->mode = VIR_STORAGE_SOURCE_POOL_MODE_HOST; def->src->srcpool->mode = VIR_STORAGE_SOURCE_POOL_MODE_HOST;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_STORAGE_SOURCE_POOL_MODE_HOST: case VIR_STORAGE_SOURCE_POOL_MODE_HOST:
def->src->srcpool->actualtype = VIR_STORAGE_TYPE_BLOCK; def->src->srcpool->actualtype = VIR_STORAGE_TYPE_BLOCK;
if (!(def->src->path = virStorageVolGetPath(vol))) if (!(def->src->path = virStorageVolGetPath(vol)))

View File

@ -1984,7 +1984,7 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt,
def->name); def->name);
goto error; goto error;
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_NETWORK_FORWARD_BRIDGE: case VIR_NETWORK_FORWARD_BRIDGE:
if (def->delay || stp || def->bridgeZone) { if (def->delay || stp || def->bridgeZone) {

View File

@ -1863,7 +1863,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node,
switch (datatype) { switch (datatype) {
case DATATYPE_UINT8_HEX: case DATATYPE_UINT8_HEX:
base = 16; base = 16;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case DATATYPE_UINT8: case DATATYPE_UINT8:
if (virStrToLong_ui(prop, NULL, base, &uint_val) >= 0) { if (virStrToLong_ui(prop, NULL, base, &uint_val) >= 0) {
if (uint_val <= 0xff) { if (uint_val <= 0xff) {
@ -1880,7 +1880,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node,
case DATATYPE_UINT16_HEX: case DATATYPE_UINT16_HEX:
base = 16; base = 16;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case DATATYPE_UINT16: case DATATYPE_UINT16:
if (virStrToLong_ui(prop, NULL, base, &uint_val) >= 0) { if (virStrToLong_ui(prop, NULL, base, &uint_val) >= 0) {
if (uint_val <= 0xffff) { if (uint_val <= 0xffff) {
@ -1897,7 +1897,7 @@ virNWFilterRuleDetailsParse(xmlNodePtr node,
case DATATYPE_UINT32_HEX: case DATATYPE_UINT32_HEX:
base = 16; base = 16;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case DATATYPE_UINT32: case DATATYPE_UINT32:
if (virStrToLong_ui(prop, NULL, base, &uint_val) >= 0) { if (virStrToLong_ui(prop, NULL, base, &uint_val) >= 0) {
item->u.u32 = uint_val; item->u.u32 = uint_val;
@ -2131,7 +2131,7 @@ virNWFilterRuleValidate(virNWFilterRuleDefPtr rule)
portData = &rule->p.ipHdrFilter.portData; portData = &rule->p.ipHdrFilter.portData;
protocol = "IP"; protocol = "IP";
dataProtocolID = &rule->p.ipHdrFilter.ipHdr.dataProtocolID; dataProtocolID = &rule->p.ipHdrFilter.ipHdr.dataProtocolID;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_NWFILTER_RULE_PROTOCOL_IPV6: case VIR_NWFILTER_RULE_PROTOCOL_IPV6:
if (portData == NULL) { if (portData == NULL) {
portData = &rule->p.ipv6HdrFilter.portData; portData = &rule->p.ipv6HdrFilter.portData;
@ -2926,7 +2926,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf,
case DATATYPE_UINT8_HEX: case DATATYPE_UINT8_HEX:
asHex = true; asHex = true;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case DATATYPE_IPMASK: case DATATYPE_IPMASK:
case DATATYPE_IPV6MASK: case DATATYPE_IPV6MASK:
/* display all masks in CIDR format */ /* display all masks in CIDR format */
@ -2937,7 +2937,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf,
case DATATYPE_UINT16_HEX: case DATATYPE_UINT16_HEX:
asHex = true; asHex = true;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case DATATYPE_UINT16: case DATATYPE_UINT16:
virBufferAsprintf(buf, asHex ? "0x%x" : "%d", virBufferAsprintf(buf, asHex ? "0x%x" : "%d",
item->u.u16); item->u.u16);
@ -2945,7 +2945,7 @@ virNWFilterRuleDefDetailsFormat(virBufferPtr buf,
case DATATYPE_UINT32_HEX: case DATATYPE_UINT32_HEX:
asHex = true; asHex = true;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case DATATYPE_UINT32: case DATATYPE_UINT32:
virBufferAsprintf(buf, asHex ? "0x%x" : "%u", virBufferAsprintf(buf, asHex ? "0x%x" : "%u",
item->u.u32); item->u.u32);

View File

@ -510,7 +510,7 @@ ppc64Compute(virCPUDefPtr host,
ret = tmp; ret = tmp;
goto cleanup; goto cleanup;
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_CPU_MODE_HOST_PASSTHROUGH: case VIR_CPU_MODE_HOST_PASSTHROUGH:
/* host-model and host-passthrough: /* host-model and host-passthrough:

View File

@ -137,16 +137,17 @@
/** /**
* *
* ATTRIBUTE_FALLTHROUGH * G_GNUC_FALLTHROUGH
* *
* silence the compiler warning when falling through a switch case * silence the compiler warning when falling through a switch case
* *
* TODO: Remove after upgrading to GLib >= 2.60
*/ */
#ifndef ATTRIBUTE_FALLTHROUGH #ifndef G_GNUC_FALLTHROUGH
# if __GNUC_PREREQ (7, 0) # if __GNUC_PREREQ (7, 0)
# define ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough)) # define G_GNUC_FALLTHROUGH __attribute__((fallthrough))
# else # else
# define ATTRIBUTE_FALLTHROUGH do {} while(0) # define G_GNUC_FALLTHROUGH do {} while(0)
# endif # endif
#endif #endif

View File

@ -8037,7 +8037,7 @@ virDomainSetMetadata(virDomainPtr domain,
"newlines")); "newlines"));
goto error; goto error;
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_METADATA_DESCRIPTION: case VIR_DOMAIN_METADATA_DESCRIPTION:
virCheckNullArgGoto(uri, error); virCheckNullArgGoto(uri, error);
virCheckNullArgGoto(key, error); virCheckNullArgGoto(key, error);

View File

@ -1346,7 +1346,7 @@ libxlMakeNic(virDomainDefPtr def,
if (VIR_STRDUP(x_nic->bridge, if (VIR_STRDUP(x_nic->bridge,
virBufferCurrentContent(&buf)) < 0) virBufferCurrentContent(&buf)) < 0)
goto cleanup; goto cleanup;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_NET_TYPE_ETHERNET: case VIR_DOMAIN_NET_TYPE_ETHERNET:
if (VIR_STRDUP(x_nic->script, script) < 0) if (VIR_STRDUP(x_nic->script, script) < 0)
goto cleanup; goto cleanup;

View File

@ -2044,7 +2044,7 @@ static int lxcContainerDropCapabilities(virDomainDefPtr def,
default: /* User specified capabilities to drop */ default: /* User specified capabilities to drop */
toDrop = (state == VIR_TRISTATE_SWITCH_OFF); toDrop = (state == VIR_TRISTATE_SWITCH_OFF);
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_CAPABILITIES_POLICY_ALLOW: case VIR_DOMAIN_CAPABILITIES_POLICY_ALLOW:
if (policy == VIR_DOMAIN_CAPABILITIES_POLICY_ALLOW) if (policy == VIR_DOMAIN_CAPABILITIES_POLICY_ALLOW)

View File

@ -2961,7 +2961,7 @@ networkStartNetwork(virNetworkDriverStatePtr driver,
* VIR_NETWORK_FORWARD_BRIDGE with no bridge device defined * VIR_NETWORK_FORWARD_BRIDGE with no bridge device defined
* (since that is macvtap bridge mode). * (since that is macvtap bridge mode).
*/ */
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_NETWORK_FORWARD_PRIVATE: case VIR_NETWORK_FORWARD_PRIVATE:
case VIR_NETWORK_FORWARD_VEPA: case VIR_NETWORK_FORWARD_VEPA:
@ -3048,7 +3048,7 @@ networkShutdownNetwork(virNetworkDriverStatePtr driver,
* VIR_NETWORK_FORWARD_BRIDGE with no bridge device defined * VIR_NETWORK_FORWARD_BRIDGE with no bridge device defined
* (since that is macvtap bridge mode). * (since that is macvtap bridge mode).
*/ */
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_NETWORK_FORWARD_PRIVATE: case VIR_NETWORK_FORWARD_PRIVATE:
case VIR_NETWORK_FORWARD_VEPA: case VIR_NETWORK_FORWARD_VEPA:
@ -3433,7 +3433,7 @@ networkValidate(virNetworkDriverStatePtr driver,
if (def->bridge != NULL) if (def->bridge != NULL)
bandwidthAllowed = true; bandwidthAllowed = true;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_NETWORK_FORWARD_PRIVATE: case VIR_NETWORK_FORWARD_PRIVATE:
case VIR_NETWORK_FORWARD_VEPA: case VIR_NETWORK_FORWARD_VEPA:
@ -4710,7 +4710,7 @@ networkAllocatePort(virNetworkObjPtr obj,
/* intentionally fall through to the direct case for /* intentionally fall through to the direct case for
* VIR_NETWORK_FORWARD_BRIDGE with no bridge device defined * VIR_NETWORK_FORWARD_BRIDGE with no bridge device defined
*/ */
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_NETWORK_FORWARD_PRIVATE: case VIR_NETWORK_FORWARD_PRIVATE:
case VIR_NETWORK_FORWARD_VEPA: case VIR_NETWORK_FORWARD_VEPA:

View File

@ -193,7 +193,7 @@ main(int argc, char **argv)
if (!lease_new) if (!lease_new)
break; break;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_LEASE_ACTION_DEL: case VIR_LEASE_ACTION_DEL:
/* Delete the corresponding lease, if it already exists */ /* Delete the corresponding lease, if it already exists */
delete = true; delete = true;
@ -230,7 +230,7 @@ main(int argc, char **argv)
} }
lease_new = NULL; lease_new = NULL;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_LEASE_ACTION_DEL: case VIR_LEASE_ACTION_DEL:
if (!(leases_str = virJSONValueToString(leases_array_new, true))) { if (!(leases_str = virJSONValueToString(leases_array_new, true))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",

View File

@ -7254,7 +7254,7 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
* early instead of erroring out */ * early instead of erroring out */
break; break;
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_GIC_VERSION_3: case VIR_GIC_VERSION_3:
case VIR_GIC_VERSION_HOST: case VIR_GIC_VERSION_HOST:
@ -9053,7 +9053,7 @@ qemuBuildShmemCommandLine(virLogManagerPtr logManager,
virCommandAddArg(cmd, "-object"); virCommandAddArg(cmd, "-object");
virCommandAddArgBuffer(cmd, &buf); virCommandAddArgBuffer(cmd, &buf);
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_DOORBELL: case VIR_DOMAIN_SHMEM_MODEL_IVSHMEM_DOORBELL:
devstr = qemuBuildShmemDevStr(def, shmem, qemuCaps); devstr = qemuBuildShmemDevStr(def, shmem, qemuCaps);
break; break;

View File

@ -209,7 +209,7 @@ qemuDomainAsyncJobPhaseToString(qemuDomainAsyncJob job,
case QEMU_ASYNC_JOB_SNAPSHOT: case QEMU_ASYNC_JOB_SNAPSHOT:
case QEMU_ASYNC_JOB_START: case QEMU_ASYNC_JOB_START:
case QEMU_ASYNC_JOB_NONE: case QEMU_ASYNC_JOB_NONE:
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case QEMU_ASYNC_JOB_LAST: case QEMU_ASYNC_JOB_LAST:
break; break;
} }
@ -234,7 +234,7 @@ qemuDomainAsyncJobPhaseFromString(qemuDomainAsyncJob job,
case QEMU_ASYNC_JOB_SNAPSHOT: case QEMU_ASYNC_JOB_SNAPSHOT:
case QEMU_ASYNC_JOB_START: case QEMU_ASYNC_JOB_START:
case QEMU_ASYNC_JOB_NONE: case QEMU_ASYNC_JOB_NONE:
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case QEMU_ASYNC_JOB_LAST: case QEMU_ASYNC_JOB_LAST:
break; break;
} }
@ -3102,7 +3102,7 @@ qemuDomainObjPrivateXMLParseBlockjobDataSpecific(qemuBlockJobDataPtr job,
if (!job->data.commit.topparent) if (!job->data.commit.topparent)
goto broken; goto broken;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case QEMU_BLOCKJOB_TYPE_ACTIVE_COMMIT: case QEMU_BLOCKJOB_TYPE_ACTIVE_COMMIT:
qemuDomainObjPrivateXMLParseBlockjobNodename(job, qemuDomainObjPrivateXMLParseBlockjobNodename(job,
"string(./top/@node)", "string(./top/@node)",

View File

@ -4324,7 +4324,7 @@ processGuestPanicEvent(virQEMUDriverPtr driver,
case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY:
if (doCoreDumpToAutoDumpPath(driver, vm, flags) < 0) if (doCoreDumpToAutoDumpPath(driver, vm, flags) < 0)
goto endjob; goto endjob;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY:
qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_CRASHED, qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_CRASHED,
@ -4341,7 +4341,7 @@ processGuestPanicEvent(virQEMUDriverPtr driver,
case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART:
if (doCoreDumpToAutoDumpPath(driver, vm, flags) < 0) if (doCoreDumpToAutoDumpPath(driver, vm, flags) < 0)
goto endjob; goto endjob;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART:
qemuDomainSetFakeReboot(driver, vm, true); qemuDomainSetFakeReboot(driver, vm, true);

View File

@ -2957,7 +2957,7 @@ qemuDomainAttachShmemDevice(virQEMUDriverPtr driver,
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("live attach of shmem model '%s' is not supported"), _("live attach of shmem model '%s' is not supported"),
virDomainShmemModelTypeToString(shmem->model)); virDomainShmemModelTypeToString(shmem->model));
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_SHMEM_MODEL_LAST: case VIR_DOMAIN_SHMEM_MODEL_LAST:
return -1; return -1;
} }
@ -5454,7 +5454,7 @@ qemuDomainDetachPrepShmem(virDomainObjPtr vm,
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("live detach of shmem model '%s' is not supported"), _("live detach of shmem model '%s' is not supported"),
virDomainShmemModelTypeToString(shmem->model)); virDomainShmemModelTypeToString(shmem->model));
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_SHMEM_MODEL_LAST: case VIR_DOMAIN_SHMEM_MODEL_LAST:
return -1; return -1;
} }

View File

@ -582,7 +582,7 @@ qemuMigrationSrcNBDCopyCancelled(virDomainObjPtr vm,
qemuMigrationNBDReportMirrorError(job, disk->dst); qemuMigrationNBDReportMirrorError(job, disk->dst);
failed = true; failed = true;
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_BLOCK_JOB_CANCELED: case VIR_DOMAIN_BLOCK_JOB_CANCELED:
case VIR_DOMAIN_BLOCK_JOB_COMPLETED: case VIR_DOMAIN_BLOCK_JOB_COMPLETED:
diskPriv->migrating = false; diskPriv->migrating = false;
@ -656,7 +656,7 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver,
qemuMigrationNBDReportMirrorError(job, disk->dst); qemuMigrationNBDReportMirrorError(job, disk->dst);
goto cleanup; goto cleanup;
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_DOMAIN_BLOCK_JOB_COMPLETED: case VIR_DOMAIN_BLOCK_JOB_COMPLETED:
ret = 1; ret = 1;
goto cleanup; goto cleanup;

View File

@ -4811,7 +4811,7 @@ qemuProcessGetNetworkAddress(const char *netname,
* fall through if netdef->bridge wasn't set, since that is * fall through if netdef->bridge wasn't set, since that is
* macvtap bridge mode network. * macvtap bridge mode network.
*/ */
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_NETWORK_FORWARD_PRIVATE: case VIR_NETWORK_FORWARD_PRIVATE:
case VIR_NETWORK_FORWARD_VEPA: case VIR_NETWORK_FORWARD_VEPA:

View File

@ -1159,7 +1159,7 @@ doRemoteOpen(virConnectPtr conn,
if (!priv->tls) if (!priv->tls)
goto failed; goto failed;
priv->is_secure = 1; priv->is_secure = 1;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
#else #else
(void)tls_priority; (void)tls_priority;
(void)sanity; (void)sanity;

View File

@ -984,7 +984,7 @@ int virConfGetValueStringList(virConfPtr conf,
} }
break; break;
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_CONF_LLONG: case VIR_CONF_LLONG:
case VIR_CONF_ULLONG: case VIR_CONF_ULLONG:

View File

@ -101,17 +101,17 @@ uint32_t virHashCodeGen(const void *key, size_t len, uint32_t seed)
switch (len & 3) { switch (len & 3) {
case 3: case 3:
k1 ^= tail[2] << 16; k1 ^= tail[2] << 16;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case 2: case 2:
k1 ^= tail[1] << 8; k1 ^= tail[1] << 8;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case 1: case 1:
k1 ^= tail[0]; k1 ^= tail[0];
k1 *= c1; k1 *= c1;
k1 = rotl32(k1, 15); k1 = rotl32(k1, 15);
k1 *= c2; k1 *= c2;
h1 ^= k1; h1 ^= k1;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
default: default:
break; break;
} }

View File

@ -487,7 +487,7 @@ virISCSIScanTargets(const char *portal,
virReportError(VIR_ERR_OPERATION_FAILED, virReportError(VIR_ERR_OPERATION_FAILED,
_("no iSCSI interface defined for IQN %s"), _("no iSCSI interface defined for IQN %s"),
initiatoriqn); initiatoriqn);
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case IQN_ERROR: case IQN_ERROR:
default: default:
return -1; return -1;

View File

@ -212,19 +212,19 @@ virScaleInteger(unsigned long long *value, const char *suffix,
switch (c_tolower(*suffix)) { switch (c_tolower(*suffix)) {
case 'e': case 'e':
scale *= base; scale *= base;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case 'p': case 'p':
scale *= base; scale *= base;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case 't': case 't':
scale *= base; scale *= base;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case 'g': case 'g':
scale *= base; scale *= base;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case 'm': case 'm':
scale *= base; scale *= base;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case 'k': case 'k':
scale *= base; scale *= base;
break; break;

View File

@ -2596,14 +2596,14 @@ virshBlockJobInfo(vshControl *ctl,
switch (last_error->code) { switch (last_error->code) {
case VIR_ERR_INVALID_ARG: case VIR_ERR_INVALID_ARG:
priv->blockJobNoBytes = true; priv->blockJobNoBytes = true;
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case VIR_ERR_OVERFLOW: case VIR_ERR_OVERFLOW:
if (!bytes && !raw) { if (!bytes && !raw) {
/* try again with MiB/s, unless forcing bytes */ /* try again with MiB/s, unless forcing bytes */
vshResetLibvirtError(); vshResetLibvirtError();
break; break;
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
default: default:
goto cleanup; goto cleanup;
} }

View File

@ -137,7 +137,7 @@ do {
relax_avail = false; relax_avail = false;
goto redefine; goto redefine;
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
#endif #endif
default: default:

View File

@ -762,7 +762,7 @@ virshParseArgv(vshControl *ctl, int argc, char **argv)
puts(VERSION); puts(VERSION);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case 'V': case 'V':
virshShowVersion(ctl); virshShowVersion(ctl);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);

View File

@ -1329,7 +1329,7 @@ vshAdmParseArgv(vshControl *ctl, int argc, char **argv)
puts(VERSION); puts(VERSION);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
ATTRIBUTE_FALLTHROUGH; G_GNUC_FALLTHROUGH;
case 'V': case 'V':
vshAdmShowVersion(ctl); vshAdmShowVersion(ctl);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);