It's certainly useful to use enum typecast in switch().
Currently, it's not used only in two places:
virSecurityDACSetSecurityTPMFileLabel and
virSecurityDACRestoreSecurityTPMFileLabel.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/security/security_dac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index 05303e7..7e0f160 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -847,7 +847,7 @@ virSecurityDACSetSecurityTPMFileLabel(virSecurityManagerPtr mgr,
{
int ret = 0;
- switch (tpm->type) {
+ switch ((enum virDomainTPMBackendType) tpm->type) {
case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH:
ret = virSecurityDACSetChardevLabel(mgr, def, NULL,
&tpm->data.passthrough.source);
@@ -867,7 +867,7 @@ virSecurityDACRestoreSecurityTPMFileLabel(virSecurityManagerPtr mgr,
{
int ret = 0;
- switch (tpm->type) {
+ switch ((enum virDomainTPMBackendType) tpm->type) {
case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH:
ret = virSecurityDACRestoreChardevLabel(mgr, def, NULL,
&tpm->data.passthrough.source);
--
1.9.3