diff --git a/bugs_that_cppcheck_finds.txt b/bugs_that_cppcheck_finds.txt deleted file mode 100644 index 343138aaa..000000000 --- a/bugs_that_cppcheck_finds.txt +++ /dev/null @@ -1,59 +0,0 @@ - -List of bugs that c++check finds - -This is very incomplete. - - - -Buffer overrun: - - // using numeric array index - char str[100]; - str[100] = 0; - - // using constant array index - char str2[SIZE]; - str[SIZE] = 0; - - // Calculating array index with constants and numbers - int i[100]; - i[sizeof(i)-1] = 0; - - // In some cases, it's detected when a variable causes buffer overrun: - char str[100]; - for (int i = 0; i <= 100; i++) - str[i] = 0; - - // Using 'strcpy' and 'strcat' can result in buffer overrun.. - char str[3]; - strcpy(str, "abc"); - - - -Memory leaks: - - // No deallocation at all - { - Fred *fred = new Fred; - } - - // Mismatching allocation / deallocation - char *str = new char[10]; - delete str; // Should be 'delete [] str' - - // An execution path may prevent a variable from being deallocated: - char *str = new char[10]; - if (ab == cd) - return; // or 'continue' or 'break' - - - -Class constructors: - - Check that all member variables are initialized. - - Check that all private member functions are used. - - - -