☰
  • 首页
  • 规则分类
  • 项目介绍
search
•••

switch 语句不应被分号隔断

9.5.1 ID_switch_semicolon
目录 › next › previous

switch 语句不应被分号隔断。

示例:

switch (v);  // Non-compliant

这种无意义的 switch 语句应及时去除或补全代码。

参考

CWE-670
Copyright©2024 360 Security Technology Inc., Licensed under the Apache-2.0 license.