Precedence Warnings (Windows Embedded CE 6.0)
1/5/2010
The Code Analysis tool detects a variety of precedence errors.
For more information about Code Analysis warnings, see this Microsoft Web site.
The following warnings are reported in this category:
Warning number | Description |
---|---|
C6235 |
(<non-zero constant> || <expression>) is always a non-zero constant. |
C6237 |
(<zero> && <expression>) is always zero. <expression> is never evaluated and may have side effects |
C6239 |
(<non-zero constant> && <expression>) always evaluates to the result of <expression>. Did you intend to use the bitwise-and operator? |
C6240 |
(<expression> && <non-zero constant>) always evaluates to the result of <expression>. Did you intend to use the bitwise-and operator? |
C6242 |
A jump out of this try block forces local unwind. Incurs severe performance penalty. |
C6243 |
Return from a finally block halts global unwind. |
C6244 |
Local declaration of <variable> hides global declaration. |
C6246 |
Local declaration of <variable> hides declaration of same name in outer scope. |
C6247 |
For-init declaration of <variable> hides declaration of same name in outer scope. |
C6248 |
DACL for a SECURITY_DESCRIPTOR structure set to NULL, resulting in an unprotected object. |
C6249 |
<kernel function> call without the MEM_RELEASE flag frees memory but not the address descriptors (VADs). |
C6250 |
Calling <function> VirtualFree without the MEM_RELEASE flag may free memory but not address descriptors (VADs); results in address space leaks |
C6255 |
_alloca indicates failure by raising a stack overflow exception. Consider using _alloca_s instead. |
C6258 |
Using TerminateThread does not allow proper thread clean up. |
C6259 |
labeled code is unreachable: (<expression> & <constant>) in switch-expr cannot evaluate to <case-label>. |
C6260 |
sizeof * sizeof is almost always wrong, did you intend to use a character count or a byte count? |
C6262 |
Function uses <constant> bytes of stack: exceeds /analyze:stacksize<constant>. Consider moving some data to heap |
C6263 |
Using _alloca in a loop; this can quickly overflow stack |
C6281 |
(<non-zero constant> || <non-zero constant>) is always a non-zero constant. Did you intend to use the bitwise-and operator? |
C6282 |
Incorrect operator: assignment of constant in Boolean context. Consider using '==' instead |
C6285 |
(<non-zero constant> || <non-zero constant>) is always a non-zero constant. Did you intend to use the bitwise-and operator? |
C6286 |
: (<non-zero constant> || <expression>) is always a non-zero constant. <expression> is never evaluated and may have side effects |
C6287 |
Redundant code. |
C6288 |
Incorrect operator: mutual inclusion over && is always zero. Did you intent to use || instead? |
C6289 |
Incorrect operator: mutual exclusion over || is always a non-zero constant. Did you intend to use && instead? |
C6290 |
Bitwise operation on logical result: ! has higher precedence than &. Use && or (!(x & y)) instead |
C6291 |
Bitwise operation on logical result: ! has higher precedence than |. Use || or (!(x | y)) instead |
C6297 |
Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Result may not be an expected value |
C6308 |
'realloc' may return null pointer: assigning a null pointer to <variable>, which is passed as an argument to 'realloc', will cause the original memory block to be leaked |
C6310 |
Illegal constant in exception filter can cause unexpected behavior |
C6312 |
Possible infinite loop: use of the constant EXCEPTION_CONTINUE_EXECUTION in the exception-filter expression of a try-except. |
C6313 |
Incorrect operator: Zero-valued flag cannot be tested with bitwise-and. Use an equality test to look for zero-valued flags |
C6314 |
Incorrect order of operations: bitwise-or has higher precedence than the conditional-expression operator. Add parentheses to clarify intent. |
C6315 |
Incorrect order of operations: bitwise-and has higher precedence than bitwise-or. Add parentheses to clarify intent. |
C6316 |
Incorrect operator: tested expression is constant and non-zero. Use bitwise-and to determine whether bits are set |
C6317 |
Incorrect operator: logical-not (!) is not interchangeable with ones-complement (~) |
C6318 |
Ill-defined __try/__except: use of the constant EXCEPTION_CONTINUE_SEARCH or another constant that evaluates to zero in the exception-filter expression. The code in the exception handler block is not executed |
C6319 |
Use of the comma-operator in a tested expression causes the left argument to be ignored when it has no side-effects |
C6331 |
Invalid parameter: passing MEM_RELEASE and MEM_DECOMMIT in conjunction to <function> is not allowed. This results in the failure of this call |
C6332 |
Invalid parameter: passing zero as the dwFreeType parameter to <function> is not allowed. This results in the failure of this call |
C6333 |
Invalid parameter: passing MEM_RELEASE and a non-zero dwSize parameter to <function> is not allowed. This results in the failure of this call |
C6334 |
sizeof operator applied to an expression with an operator may yield unexpected results |
99101 |
Internal error. |