HP Code Advisor Diagnostics

Table of Contents
About This Document.........................................................................................................9
Intended Audience.................................................................................................................................9
HP Encourages Your Comments............................................................................................................9
1 Diagnostics Categorization.........................................................................................11
Default Diagnostics...............................................................................................................................11
+wall Diagnostics..................................................................................................................................19
+wlint Diagnostics.................................................................................................................................19
+w64bit Diagnostics..............................................................................................................................21
+wendian Diagnostics...........................................................................................................................22
+wsecurity Diagnostics.........................................................................................................................22
+wlock Diagnostics...............................................................................................................................23
+wperfadvice Diagnostics.....................................................................................................................23
+w/+w1 Diagnostics..............................................................................................................................24
Diagnostic messages turned off by default...........................................................................................25
2 Diagnostics Details.......................................................................................................27
2009 nested comment is not allowed....................................................................................................27
2028 expression must have a constant value........................................................................................27
2042 operand types are incompatible (%t1 and %t2)............................................................................27
2047 incompatible redefinition of macro %nod....................................................................................28
2054 Too few arguments in macro invocation......................................................................................28
2063 shift count is too large...................................................................................................................28
2064 declaration does not declare anything.........................................................................................29
2068 integer conversion resulted in a change of sign...........................................................................29
2069 integer conversion resulted in truncation....................................................................................29
2077 this declaration has no storage class or type specifier..................................................................29
2082 storage class is not first.................................................................................................................30
2102 forward declaration of enum type is nonstandard.......................................................................30
2108 signed bit field of length 1............................................................................................................30
2111 statement is unreachable..............................................................................................................31
2117 non-void %n should return a value..............................................................................................31
2120 return value type does not match the function type....................................................................31
2128 loop is not reachable from preceding code...................................................................................31
2144 a value of type %t1 cannot be used to initialize an entity of type %t2.........................................32
2147 declaration is incompatible with %nfd.........................................................................................32
2152 conversion of nonzero integer to pointer.....................................................................................32
2167 argument of type %t1 is incompatible with parameter of type %t2 ............................................33
2170 pointer points outside of underlying object.................................................................................33
2172 external/internal linkage conflict with previous declaration %nod.............................................33
2174 expression has no effect................................................................................................................34
2175 subscript out of range...................................................................................................................34
2177 %n was declared but never referenced.........................................................................................34
2180 argument is incompatible with formal parameter.......................................................................34
2181 argument is incompatible with corresponding format string conversion...................................35
2186 pointless comparison of unsigned integer with zero...................................................................35
2187 use of "=" where "==" may have been intended............................................................................35
2188 enumerated type mixed with another type..................................................................................35
2191 type qualifier is meaningless on cast type....................................................................................36
Table of Contents 3