HP Code Advisor Diagnostics Reference Guide (5900-1865, July 2011)

Contents
About This Document.....................................................................................7
Intended Audience....................................................................................................................7
HP Encourages Your Comments..................................................................................................7
1 Diagnostics Categorization..........................................................................8
1.1 Default Diagnostics..............................................................................................................8
1.2 +wall Diagnostics..............................................................................................................16
1.3 +wlint Diagnostics.............................................................................................................16
1.4 +w64bit Diagnostics.........................................................................................................18
1.5 +wendian Diagnostics.......................................................................................................19
1.6 +wsecurity Diagnostics.......................................................................................................19
1.7 +wlock Diagnostics...........................................................................................................20
1.8 +wperfadvice Diagnostics..................................................................................................20
1.9 +w/+w1 Diagnostics.........................................................................................................21
1.10 Diagnostic messages turned off by default...........................................................................22
2 Diagnostics Details...................................................................................24
2.1 2009 nested comment is not allowed...................................................................................24
2.2 2028 expression must have a constant value........................................................................24
2.3 2042 operand types are incompatible (%t1 and %t2)............................................................24
2.4 2047 incompatible redefinition of macro %nod....................................................................25
2.5 2054 Too few arguments in macro invocation......................................................................25
2.6 2063 shift count is too large..............................................................................................25
2.7 2064 declaration does not declare anything........................................................................26
2.8 2068 integer conversion resulted in a change of sign............................................................26
2.9 2069 integer conversion resulted in truncation......................................................................26
2.10 2077 this declaration has no storage class or type specifier..................................................26
2.11 2082 storage class is not first............................................................................................27
2.12 2102 forward declaration of enum type is nonstandard.........................................................27
2.13 2108 signed bit field of length 1........................................................................................27
2.14 2111 statement is unreachable............................................................................................28
2.15 2117 non-void %n should return a value..............................................................................28
2.16 2120 return value type does not match the function type........................................................28
2.17 2128 loop is not reachable from preceding code.................................................................28
2.18 2144 a value of type %t1 cannot be used to initialize an entity of type %t2.............................29
2.19 2147 declaration is incompatible with %nfd.........................................................................29
2.20 2152 conversion of nonzero integer to pointer.....................................................................29
2.21 2167 argument of type %t1 is incompatible with parameter of type %t2 ................................30
2.22 2170 pointer points outside of underlying object..................................................................30
2.23 2172 external/internal linkage conflict with previous declaration %nod..................................30
2.24 2174 expression has no effect...........................................................................................30
2.25 2175 subscript out of range..............................................................................................31
2.26 2177 %n was declared but never referenced.......................................................................31
2.27 2180 argument is incompatible with formal parameter.........................................................31
2.28 2181 argument is incompatible with corresponding format string conversion...........................32
2.29 2186 pointless comparison of unsigned integer with zero.....................................................32
2.30 2187 use of "=" where "==" may have been intended.........................................................32
2.31 2188 enumerated type mixed with another type...................................................................32
2.32 2191 type qualifier is meaningless on cast type...................................................................33
2.33 2192 unrecognized character escape sequence..................................................................33
2.34 2193 zero used for undefined preprocessing identifier..........................................................33
2.35 2223 function %sq declared implicitly................................................................................33
Contents 3