﻿# V7031\. A suspicious label was found inside a 'switch' statement\. This may be a typo, and a different label was intended\.

The analyzer has detected a label inside the switch statement that differs from the case or default clauses\. This looks like a typo\. As a result, the intended branch never executes\.

Look at the example:

```cpp
switch (status) {
  case 1:
    handleActive();
    break;
  case 2:
    handlePending();
    break;
  defalt:
    handleUnknown();
    break;
}
```

The code looks like it should call `handleUnknown` for all `status` values besides `1` and `2`\. In fact, this will not happen, since `defalt` is an ordinary label rather than the `default` clause\. The call to `handleUnknown` is unreachable for any `status` value\.

The fixed code:

```cpp
switch (status) {
  case 1:
    handleActive();
    break;
  case 2:
    handlePending();
    break;
  default:
    handleUnknown();
    break;
}
```