CS.CONSTCOND.DO
'do' ステートメントの条件は、常に true であるか常に false です。
例 1
コピー
                                                    
                                                
                                              class Increaser {
      void Increase() {
          int x = 3;
          do {
              x++;
          } while (3 < 10);  // defect - the condition is constant
          do {
              x--;
          } while(false);    // Ok - typical usage of 'do' constructs when a user to organize a code block
         do {
             return;
         } while(true);     // Ok - typical usage of 'do' constructs when a user to organize an infinite loop
     }
 }外部参考資料
セキュリティトレーニング
Secure Code Warrior が提供しているアプリケーションセキュリティトレーニング教材。