Commit Graph

14280 Commits

Author SHA1 Message Date
Daniel Marjamäki 6b124a37d8 Cleanup some casts 2015-11-28 10:11:07 +01:00
Daniel Marjamäki 5d1307814b addons: Added an addon that locates casts. 2015-11-28 09:29:19 +01:00
Daniel Marjamäki 8689693d6c Fix Travis 2015-11-28 09:26:44 +01:00
Daniel Marjamäki c0da6c1541 simplifyCalculations: handle '(4%1<<1&4!=1)' better. must combine '!' '=' before constant folding. fixed the operator precedence for comparison operators. (#4931) 2015-11-28 09:04:22 +01:00
Alexander Mai 44305fd98e #6940 Unsigned overflow in TestBufferOverrun::negativeArraySize. Don't try to calculate size of array with negative array size 2015-11-28 07:27:52 +01:00
Alexander Mai c70b71e353 #5888 fsanitize=undefined: signed integer overflow: 4611686018427387904 * 2 cannot be represented in type 'long long int' in valueflow.cpp 2015-11-27 21:45:08 +01:00
Alexander Mai c6ec5ca734 Fix MathLib::characterLiteralToLongNumber for LP64 again. 2015-11-27 21:43:51 +01:00
Alexander Mai d4749c3377 Fix excessive left shift of signed integer and some doxygen errors 2015-11-27 19:32:28 +01:00
Daniel Marjamäki 1bf547c716 Fixed #4931 (Wrong calculation for '2|0*0&2>>1+0%2*1') 2015-11-27 15:02:49 +01:00
Daniel Marjamäki 1977a18a1e simplifyNumericCalculations: Don't fold negative constants in shift/bitmask calculation. Behaviour is not well defined. 2015-11-27 14:16:49 +01:00
PKEuS 3b4160600d Fixed crash in CheckMemoryLeak::functionReturnType() for unary operator:: (#7172) 2015-11-27 11:18:40 +01:00
PKEuS 0ba3d25917 CheckMemoryLeak: Correctly detect new char[...]() as array allocation (#7164) 2015-11-27 11:04:18 +01:00
Aleksandr Pikalev a6206ae727 Fixed #7174: Do not forget argument number in Library Editor 2015-11-27 10:54:06 +01:00
Frank Zingsheim b48cbde860 Cmake: Allow the RelWithDebInfo MinSizeRel as Configuration Type, additionally 2015-11-26 21:16:59 +01:00
Frank Zingsheim e5a3ba7cac Switch off -D_GLIBCXX_DEBUG for Clang on Linux
(see 73b088a6dd for Makefile)
2015-11-26 21:13:04 +01:00
Frank Zingsheim 1d7fac3ca9 Added testrunner test to cmake. #7098 2015-11-26 21:01:07 +01:00
Frank Zingsheim 70c20515a9 Cmake object linkage. Fix #7128: (cppcheck 1.70 doesn't report any warnings) 2015-11-26 20:25:09 +01:00
Alexander Mai fe7d5cd242 Fix small glitch in previous commit - causing a compile error on Windows 2015-11-25 22:45:06 +01:00
Alexander Mai 03ecb980a5 Small refactoring of stacktrace printing code 2015-11-25 22:37:38 +01:00
Matthias Krüger 87ce88d6ab CheckFunctions::checkProhibitedFunctions(): don't warn about alloca when --enable=warning is not given. 2015-11-25 22:05:51 +01:00
Daniel Marjamäki 35b270ddcc Fixed #4052 (Show Cppcheck version in online demo) 2015-11-25 19:33:04 +01:00
Daniel Marjamäki 2737f63f71 Wrong calculation of constants (simplifying: +,<<,% operations) 2015-11-25 16:46:39 +01:00
orbitcowboy f84af529af Extended windows.cfg and posix.cfg about missing functions, found by using --check-library on some projects. 2015-11-25 11:02:32 +01:00
orbitcowboy f6b19519cb Merge pull request #710 from bbannier/fix_compilation
Include cmath for std::fabs
2015-11-25 10:48:33 +01:00
Benjamin Bannier e84fe33ad0 Include cmath for std::fabs 2015-11-25 10:16:41 +01:00
orbitcowboy 78bd49c2ba windows.cfg: Added strtok_s and wcstok_s 2015-11-25 09:53:10 +01:00
Daniel Marjamäki 6fe686a82a Merge pull request #709 from PSIAlt/xcode_fix_projectfile
Fix xcode project file
2015-11-24 10:45:46 +01:00
Galimov Albert f05de30de1 Fix xcode project file 2015-11-23 23:00:21 +03:00
Alexander Mai a7ab5ecf08 Fix some compiler in MathLib::characterLiteralToLongNumber + some small refactoring 2015-11-23 20:41:21 +01:00
Daniel Marjamäki 5135bae777 Tokenizer: Cleanup the Tokenizer::tokenizeCondition used by the preprocessor 2015-11-23 16:53:30 +01:00
Daniel Marjamäki a5149d68ab daca2: fix compilation of cppcheck 2015-11-23 11:19:44 +01:00
Daniel Marjamäki 9f41fcfbcb democlient: skip the leading 'code='. output warnings in the log. 2015-11-23 09:27:33 +01:00
Daniel Marjamäki e8182395f7 Fix 'make checkcfg' by adding inline suppressions when obsolete functions are used. 2015-11-22 17:52:47 +01:00
Alexander Mai b7030fcfa1 Fix compiler error (VS2010) and warning 2015-11-22 16:56:44 +01:00
Daniel Marjamäki d93cf96a29 Fixed #6769 (false positive: Uninitialized struct member: epoch.integer) 2015-11-22 16:20:46 +01:00
Alexander Mai 63b7700660 Use clang/gcc-conforming encoding of multicharacter literals 2015-11-22 14:20:36 +01:00
PKEuS f516de8633 Moved a few checks from CheckOther to CheckFunctions 2015-11-22 13:49:10 +01:00
Daniel Marjamäki 9864f340f5 posix.cfg: reformatting using library editor 2015-11-22 13:34:40 +01:00
Alexander Mai 9ca6704c81 #7162 Support multicharacter char literals. 2015-11-22 13:31:31 +01:00
Daniel Marjamäki e2b859bf42 Library Editor: Load/save <warn> elements 2015-11-22 11:45:29 +01:00
Matthias Krüger 8db72994fb make checkcfg / runtests.sh: be verbose (set -x) 2015-11-22 11:03:10 +01:00
Matthias Krüger a610ef9ce8 fix internal warning:
[lib/checkfunctions.cpp:44]: (warning) Found simple pattern inside Token::Match() call: "alloca ("
2015-11-22 11:00:36 +01:00
Alexander Mai b1385dd951 Run dmake to update Makefile etc. 2015-11-22 10:40:48 +01:00
PKEuS 57d1196386 Replaced CheckNonReentrantFunctions and CheckObsoleteFunctions by generic CheckFunctions which is based on Library (#6529) 2015-11-22 09:18:07 +01:00
Alexander Mai 517922feb6 MathLib::characterLiteralToLongNumber now reports more specific error messages for unsupported unicode literals (see #7162) 2015-11-22 07:38:38 +01:00
Alexander Mai 714579401f #7160 Internal error: Unhandled char constant '\1'. Correct MathLib::toLongNumber. Create new utility function MathLib::characterLiteralToLongNumber 2015-11-21 22:35:58 +01:00
Daniel Marjamäki 5f68f3ddf6 Fixed #6264 (FP: gimp: struct initialized via pointers to member variables) 2015-11-21 19:31:18 +01:00
Alexander Mai 9757f5b5f4 Improve exception handling on un*x: try to print a callstack in out-of-memory situations as well 2015-11-21 16:50:57 +01:00
Daniel Marjamäki c62b23c4fc posix.cfg: saved with the Library Editor 2015-11-21 16:10:46 +01:00
Daniel Marjamäki aedba792b5 Library Editor: Don't write empty comments 2015-11-21 16:10:14 +01:00