C5908: Constant switch expression

[WARNING]

Description

The Compiler has detected a constant switch expression. The compiler optimizes and reduces such a switch expression. This message may be generated during tree optimizations (Option -Ont to switch it off).

Example
  switch(2){

  
    case 1: break;

  
    case 2: i = 0; break;

  
    case 3: i = 7; break;

  
  };  // optimized to i = 0;

  
Tips

If it is a programming error, correct the statement.