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

for 语句不应被分号隔断

9.2.1 ID_for_semicolon
目录 › next › previous

for 语句不应被分号隔断。

示例:

for (....);  // Non-compliant, see the semicolon
{
    ....
}

分号使循环失效,这可能是笔误,也可能是有人恶意篡改了代码,应立即修正。

相关

ID_do_brace ID_if_brace ID_switch_brace ID_while_brace

参考

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