CWE-1071Empty Code Block

PUBLISHEDweakness record
released 2019-01-03 · last modified 2025-12-11

Metadata

CWE ID:
CWE-1071
摘要:
Base
结构:
Simple
状态:
Incomplete
发布日期:
2019-01-03
更新日期:
2025-12-11

名称

Empty Code Block

描述

The source code contains a block that does not contain any code, i.e., the block is empty.

Empty code blocks can occur in the bodies of conditionals, function or method definitions, exception handlers, etc. While an empty code block might be intentional, it might also indicate incomplete implementation, accidental code deletion, unexpected macro expansion, etc. For some programming languages and constructs, an empty block might be allowed by the syntax, but the lack of any behavior within the block might violate a convention or API in such a way that it is an error.

常见后果

范围:
Other
影响:
Reduce Reliability

相关 CWE