root@latelee~/test# cppcheck gcc_warning.cpp --enable=all Checking gcc_warning.cpp... [gcc_warning.cpp:56] -> [gcc_warning.cpp:50]: (warning) Possible null pointer dereference: fp - otherwise it is redundant to check it against null. [gcc_warning.cpp:13]: (style) Variable 'unused_buffer' is assigned a value that is never used. [gcc_warning.cpp:23]: (style) Variable 'aaa' is assigned a value that is never used. [gcc_warning.cpp:59]: (style) Variable 'dir' is assigned a value that is never used. [gcc_warning.cpp:65]: (style) Variable 'ret' is assigned a value that is never used. [gcc_warning.cpp:28]: (error) Array 'foo[2]' accessed at index 2, which is out of bounds. [gcc_warning.cpp:29]: (error) Array 'foo[2]' accessed at index 3, which is out of bounds. [gcc_warning.cpp:30]: (error) Array 'foo[2]' accessed at index 4, which is out of bounds. [gcc_warning.cpp:31]: (error) Array 'foo[2]' accessed at index 5, which is out of bounds. [gcc_warning.cpp:53]: (error) Memory leak: p [gcc_warning.cpp:53]: (error) Resource leak: fp [gcc_warning.cpp:61]: (error) Resource leak: dir Checking usage of global functions.. (information) Cppcheck cannot find all the include files (use --check-config for details)