---
title: "C6292 | Microsoft Docs"
ms.date: 11/15/2016
ms.prod: "visual-studio-dev14"
ms.technology: vs-ide-code-analysis
ms.topic: reference
f1_keywords: 
  - "C6292"
helpviewer_keywords: 
  - "C6292"
ms.assetid: 23998c78-ebd7-4ba1-a391-7b31b170f8fe
caps.latest.revision: 14
author: corob-msft
ms.author: corob
manager: jillfra
---
# C6292
[!INCLUDE[vs2017banner](../includes/vs2017banner.md)]

warning C6292: ill-defined for-loop: counts up from maximum  
  
 This warning indicates that a for-loop might not function as intended.  
  
 It occurs when a loop counts up from a maximum, but has a lower termination condition. This loop will terminate only after integer overflow occurs.  
  
## Example  
 The following code generates this warning:  
  
```  
void f( )  
{  
   int i;  
  
   for (i = 100; i >= 0; i++)  
   {  
      // code ...  
   }  
}  
```  
  
 To correct this warning, use the following code:  
  
```  
void f( )  
{  
   int i;  
  
  for (i = 100; i >= 0; i--)  
   {  
      // code ...  
   }  
}  
```
