Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

CDT/Archive/designs/StaticAnalysis/CheckerIdeas

< CDT‎ | Archive‎ | designs‎ | StaticAnalysis
Revision as of 05:33, 24 March 2010 by Elaskavaia.cdt.gmail.com (Talk | contribs) (New page: ;Unused #include #include <stdio.h> int main() { return 1; } ;Malloc called without sizeof consideration int * arr = (int *)malloc(20); // should be malloc(20*sizeof(int)) ;Assigned ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Unused #include
 #include <stdio.h>
 int main() { return 1; }
Malloc called without sizeof consideration
 int * arr = (int *)malloc(20); // should be malloc(20*sizeof(int))
Assigned to itself
 x = x;
Result of comparison is constant
 (x==x)
 (!x && x)
Redundant comparison operations
 (!(!x))
 (x!=0 || 0!=x)

Back to the top