title: MISRA C 2012 Rule 16.1 All switch statements should be well formed
body: <p>I am trying to get rid of violation og rule 16.1 from my code.</p>
  
  <p>Sample code:</p>
  
  <pre><code>switch (cmd) {
      case ADD:
          result = add(op1, op2);
          break;
      case SUB: 
          if (!flag) {    // Problem here!
              break;     
          }
          //Fallthrough
      case ALU_CMD_SUB:
          result = sub(op1, op2);
          .
          .
          .
          .
          .
          .
  
          break;
      case ALU_CMD_DIV:
          result = divide(op1, op2);
          break;
      case ALU_CMD_EXP:
          result = (int32_t)expo((uint32_t)op1, (uint32_t)op2);
          break;
      default:
          incr_default(&amp;default_cond);
          //fix for the violation: insert a break statement
          break;
  }     
  </code></pre>
  
  <p>Here the switch case with SUB is not well formed. </p>
  
  <p>Is there any way to fix this issue without having much noise in the code.</p>
  
  <p>This is also violating rule 16.3 where switch case doesn't have a break statement.</p>