cppcheck/lib
Thomas Jarosch 849bee8437 [PATCH] Detect suspicious use of semicolon after 'if/for/while'
statements if they are followed by a {..} block.

Examples are:

for (int i = 0; i < 10; ++i);
{
   printf("i)";
}

or

if (i == 100);
{
   die("Wrong argument");
}

This new check is active if you enable inconclusive checks.
2011-10-11 08:41:39 +02:00
..
check.h Inconclusive checking: Report inconclusive errors with reportInconclusiveError. It takes the same parameters as reportError. 2011-04-14 18:02:01 +02:00
check64bit.cpp Fixed #3073 (False positive: Assigning an integer (int/long/etc) to a pointer is not portable) 2011-09-04 13:03:29 +02:00
check64bit.h corrected a comment 2011-08-03 07:30:54 +02:00
checkassignif.cpp Move "information" errors to "style" errors. 2011-10-05 20:44:00 +03:00
checkassignif.h AssignIf: detect more problems for 'if' and 'else if' conditions 2011-08-01 11:33:09 +02:00
checkautovariables.cpp fix false positive introduced by previous false negative fix commit 2011-09-02 10:39:04 -04:00
checkautovariables.h fix #3064 (false negative: returning address of stack variable) 2011-08-31 21:36:31 -04:00
checkbufferoverrun.cpp Fixed #3161 (Show buffers size info for snprintf() buffer overruns) 2011-10-05 20:17:57 +02:00
checkbufferoverrun.h Fixed #3161 (Show buffers size info for snprintf() buffer overruns) 2011-10-05 20:17:57 +02:00
checkclass.cpp Move "information" errors to "style" errors. 2011-10-05 20:44:00 +03:00
checkclass.h fix #3008 (New check: Order of initialisation list) 2011-09-27 21:07:37 -04:00
checkexceptionsafety.cpp Use "enabled" list for the style checking. 2011-08-07 10:28:52 +03:00
checkexceptionsafety.h Ticket #2388. Added more detail to the 'exceptRethrowCopy' error message. 2011-02-06 02:01:14 -08:00
checkmemoryleak.cpp Fixed #3096 (false negative: memory leak not found when passing string to strtok) 2011-09-09 07:25:47 +02:00
checkmemoryleak.h fixed a few doxygen warnings 2011-09-08 18:28:05 +02:00
checknonreentrantfunctions.cpp enable: break out 'performance' and 'portability' from the 'style' id. Ticket: #3074 2011-09-03 15:30:30 +02:00
checknonreentrantfunctions.h nonreentrant-functions: added more functions to check 2011-07-30 11:15:51 +02:00
checknullpointer.cpp Null pointer: improved inconclusive checking in CheckNullPointer::nullPointerAfterLoop 2011-10-09 15:09:02 +02:00
checknullpointer.h Null pointer: improved inconclusive checking in CheckNullPointer::nullPointerAfterLoop 2011-10-09 15:09:02 +02:00
checkobsoletefunctions.cpp Fixed 3133 (Improve Check: Found obsolete function) 2011-10-09 10:31:21 +02:00
checkobsoletefunctions.h Fixed #3072 (improve check: deprecated function alloca) 2011-10-06 08:10:51 +02:00
checkother.cpp [PATCH] Detect suspicious use of semicolon after 'if/for/while' 2011-10-11 08:41:39 +02:00
checkother.h [PATCH] Detect suspicious use of semicolon after 'if/for/while' 2011-10-11 08:41:39 +02:00
checkpostfixoperator.cpp enable: break out 'performance' and 'portability' from the 'style' id. Ticket: #3074 2011-09-03 15:30:30 +02:00
checkpostfixoperator.h initialise Check::_name in constructor rather than relying on virtual Check::name() 2011-02-02 22:58:25 +13:00
checkstl.cpp enable: break out 'performance' and 'portability' from the 'style' id. Ticket: #3074 2011-09-03 15:30:30 +02:00
checkstl.h fix #747 and #748 (incorrect use of auto_ptr - new check) 2011-06-16 20:26:00 +02:00
checkuninitvar.cpp Fixed #3159 (Uninitialized variable false positive) 2011-10-02 20:38:58 +02:00
checkuninitvar.h uninitstring: fix false negatives when non-zero memset is used. Ticket: #3050 2011-09-05 19:42:48 +02:00
checkunusedfunctions.cpp fix #3127 ([False positive] _tmain function i VS 2010 project) 2011-09-21 20:16:20 -04:00
checkunusedfunctions.h Ticket 3059: Report the correct line number in unused functions warnings 2011-09-18 07:13:39 +02:00
checkunusedvar.cpp unused var: use 'else if' instead of 'if' 2011-09-11 08:18:32 +02:00
checkunusedvar.h move unused variable checks from checkother to checkunusedvar 2011-08-19 14:35:25 -04:00
cppcheck.cpp 1.51: Updated versions 2011-10-08 07:45:39 +02:00
cppcheck.h Add command line option: --debug-fp ... If used, cppcheck will print out the code generating error into output stream. 2011-08-16 22:58:27 +03:00
errorlogger.cpp Move Suppressions class to own source files. 2011-08-22 19:57:28 +03:00
errorlogger.h Move Suppressions class to own source files. 2011-08-22 19:57:28 +03:00
executionpath.cpp Fixed #2796 (uninitialized and leaving scope) 2011-07-25 16:35:30 +02:00
executionpath.h Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
lib.pri Move Suppressions class to own source files. 2011-08-22 19:57:28 +03:00
mathlib.cpp mathlib: fixed #2950: comparison of floating point values 2011-07-29 23:37:40 +02:00
mathlib.h fix #2827 to use numeric comparisons 2011-07-16 23:05:35 -04:00
path.cpp CLI: Warn if user tries to exclude header files. 2011-08-06 17:24:10 +03:00
path.h fixed a few doxygen warnings 2011-09-08 18:28:05 +02:00
pcrerules.pri put the rules logic in its own .pri file, and allow easier override 2011-08-18 15:42:19 -05:00
preprocessor.cpp Preprocessor: allow that 'missingInclude' messages are suppressed with '--suppress=missingInclude' 2011-08-20 11:23:59 +02:00
preprocessor.h Preprocessor: fix handling of (1&&2) condition 2011-07-16 09:24:27 +02:00
settings.cpp Settings: add missing initialisation for member variable c99 (reported by Valgrind) 2011-10-08 10:29:11 +02:00
settings.h Fixed #3072 (improve check: deprecated function alloca) 2011-10-06 08:10:51 +02:00
suppressions.cpp Compile fix. 2011-08-22 20:21:25 +03:00
suppressions.h Add doxygen grouping for the new file. 2011-08-22 20:46:53 +03:00
symboldatabase.cpp fix tokenizer and symbol database to not mistake goto statement for variable declaration 2011-10-07 08:11:48 -04:00
symboldatabase.h another partial fix for #3063 (false negative: multi dimensional arrays not well supported) 2011-09-02 21:07:29 -04:00
timer.cpp Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
timer.h Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
token.cpp Fixed #3118 (Tokenizer: str*cmp() in hot spot code) 2011-09-20 19:03:19 +02:00
token.h Fixed #2892 (false positive: (portability) Assigning an address value to the integer (int/long/etc) type is not portable) 2011-07-07 15:14:33 +02:00
tokenize.cpp Fixed some simple errors in some old commits. 2011-10-10 17:18:47 +02:00
tokenize.h run astyle 2011-10-06 21:10:20 -04:00