...
| Code Block | ||
|---|---|---|
| ||
int func(int condition) {
int *s = NULL;
if (condition) {
s = malloc(10);
if (s == NULL) {
/* Handle Error */
}
/* insert data into s */
}
/* ... */
if (s) {
/* This code is now reachable */
}
return 0;
}
|
Risk Assessment
The presence of dead code may indicate logic errors that can lead to unintended program behavior.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
|---|---|---|---|---|---|
MSC07-A | 1 (low) | 1 (unlikely) | 1 (high) | P1 | L3 |
...