diff mbox series

[v2,9/9] rasdaemon: add default branch for switch statement

Message ID 1574770356-129510-10-git-send-email-tanxiaofei@huawei.com (mailing list archive)
State New, archived
Headers show
Series rasdaemon: fix some issues reported by static code analysis | expand

Commit Message

Xiaofei Tan Nov. 26, 2019, 12:12 p.m. UTC
Add default branch for the switch statements that default branch
was missed.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
---
 non-standard-hisi_hip08.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/non-standard-hisi_hip08.c b/non-standard-hisi_hip08.c
index f8f8e1d..4cfa107 100644
--- a/non-standard-hisi_hip08.c
+++ b/non-standard-hisi_hip08.c
@@ -205,6 +205,8 @@  static char *err_severity(uint8_t err_sev)
 	case HISI_ERR_SEVERITY_FE: return "fatal";
 	case HISI_ERR_SEVERITY_CE: return "corrected";
 	case HISI_ERR_SEVERITY_NONE: return "none";
+	default:
+		break;
 	}
 	return "unknown";
 }
@@ -451,6 +453,8 @@  static char *pcie_local_sub_module_name(uint8_t id)
 	case HISI_PCIE_SUB_MODULE_ID_MAC: return "MAC_Layer";
 	case HISI_PCIE_SUB_MODULE_ID_DL: return "DL_Layer";
 	case HISI_PCIE_SUB_MODULE_ID_SDI: return "SDI_Layer";
+	default:
+		break;
 	}
 	return "unknown";
 }