Commit Graph

622 Commits

Author SHA1 Message Date
orbitcowboy a886f4f649 std.cfg: Added support for std::string::erase(). 2017-10-15 11:17:17 +02:00
orbitcowboy db787369b9 #8243: Changed order of includes. Moved mathlib include at first place. 2017-10-14 16:30:10 +02:00
Daniel Marjamäki 81beb47e5c std.cfg: Added std::...::insert configurations 2017-10-13 15:39:08 +02:00
orbitcowboy 3c96924c56 std.cfg: Improved support for std::string::resize(). 2017-10-13 10:22:59 +02:00
orbitcowboy 43de937a4e Removed not needed <use-retval/> from std::string::resize(). 2017-10-13 10:15:53 +02:00
orbitcowboy 8160cc2fc6 std.cfg: Improved support for find, std::string functions. 2017-10-13 09:58:23 +02:00
orbitcowboy 3eb84fa980 std.cfg: Warn when parameters of std::swap() are not initialized. 2017-10-11 15:54:49 +02:00
orbitcowboy dc2aff42a8 std.cfg: Added support for std::string::rfind(). 2017-10-11 15:50:59 +02:00
orbitcowboy 5bc61e35a0 std.cfg: Added support for std::swap. 2017-10-11 13:12:00 +02:00
Daniel Marjamäki 29a0dfc152 std.cfg: add configuration for std::string::find_first_of and std::string::find_last_of 2017-10-11 08:33:12 +02:00
Daniel Marjamäki 7f9571c4e6 std: added std find methods 2017-10-10 22:15:56 +02:00
orbitcowboy ee6e4c3ccd std.cfg: Fixed FP in std::string:swap(). 2017-10-07 00:49:09 +02:00
orbitcowboy c978e66936 std.cfg: Added support for std::string:swap(). 2017-10-07 00:46:34 +02:00
orbitcowboy 702a213175 std.cfg: Added support for std::vector::at(). 2017-10-06 17:02:25 +02:00
orbitcowboy 4b4796a35f std.cfg: Added support for std::string::push_back(). 2017-10-06 16:51:10 +02:00
orbitcowboy beb9223b6f std.cfg: Added more returnValue-types. 2017-10-05 10:23:48 +02:00
orbitcowboy f3d5e526d0 std.cfg: Added more returnValue-types. 2017-10-05 09:58:12 +02:00
orbitcowboy 0d888ba82d std.cfg: Added more return value types. 2017-10-03 09:39:43 +02:00
orbitcowboy c133e1d6f3 std.cfg: Added more returnValue-types. 2017-10-02 19:15:38 +02:00
orbitcowboy e9b4cbbd87 std.cfg: Added more returnValue-types. 2017-10-02 17:01:10 +02:00
Alexander Mai 8d4c2d3145 Fix typo 2017-09-26 20:59:23 +02:00
orbitcowboy 7e92535b59 std.cfg: Improved support for std::ios std::ios_base std::ofstream and std::ostream functions. 2017-09-08 16:43:40 +02:00
orbitcowboy 27be75b224 std.cfg: Improved support for returnValue types for some math functions. 2017-09-05 16:27:02 +02:00
orbitcowboy 94c1809f26 std.cfg: Improved support for returnValue types for some math functions. 2017-09-05 16:01:33 +02:00
orbitcowboy 7ab8d758c5 std.cfg: Added more returnValue-types. 2017-08-01 14:33:12 +02:00
orbitcowboy ad14d43aaf std.cfg: Added return-type for some functions. 2017-07-28 16:47:17 +02:00
orbitcowboy b2fcdf8a8a std.cfg: Added return-type for some functions. 2017-07-28 16:26:19 +02:00
amai2012 947ace6194 Fix false positive 2017-06-22 09:23:15 +02:00
Alexander Mai a350e6c7e8 Add more interfaces 2017-06-02 22:58:39 +02:00
alexander 49a28d00f9 Add some interfaces + small changes to existing ones 2017-05-29 00:47:24 +02:00
orbitcowboy 19ce65217e #8033: Fixed FP and removed not-uninit-configuration from std.cfg. 2017-05-01 16:53:44 +02:00
Daniel Marjamäki 07726c1037 std.cfg: update some c++ configs 2017-04-23 19:40:45 +02:00
PKEuS 5027810a79 Added sfml.cfg
std.cfg: Removed redundant <function> definition
2017-04-21 11:51:40 +02:00
orbitcowboy dd0158ee63 std.cfg and windows.cfg: Improved support for localtime functions. 2017-04-19 09:27:24 +02:00
PKEuS 094b7a706f std.cfg: Added std::streamoff and imaxdiv_t 2017-04-18 10:46:27 +02:00
orbitcowboy 9f66908971 Fixed #7955: False positive about invalid fseek argument. 2017-03-21 14:23:31 +01:00
orbitcowboy 6111b38ebb std.cfg and windows.cfg: Improved support for freopen-functions. 2017-03-19 18:23:31 +01:00
orbitcowboy 468fadff86 std.cfg: Cleanup wrong configuration. 2017-03-15 09:39:11 +01:00
orbitcowboy 9f124b295e std.cfg: Improved support container functions. 2017-03-15 08:49:08 +01:00
PKEuS 1a7265cd7e std.cfg: Added lots of container functions, string functions and three operands overload of std::hypot 2017-03-14 17:52:35 +01:00
orbitcowboy c87e83575a std.cfg: Added support for std::copy(). 2017-03-07 10:54:44 +01:00
orbitcowboy e3d879e43d std.cfg: Improved support for some std::wstring functions. 2017-03-06 16:40:49 +01:00
orbitcowboy bf68638771 std.cfg: Improved support for string to (int|double|...)-functions. 2017-03-06 16:36:14 +01:00
Daniel Marjamäki 603171201a added some more configuration for standard containers 2017-03-05 22:03:12 +01:00
Daniel Marjamäki 34dd4935d9 updated STL configuration 2017-03-05 19:47:47 +01:00
Daniel Marjamäki ddc73008a6 std.cfg: update configuration for STL containers 2017-03-05 18:31:03 +01:00
Daniel Marjamäki e560ad1616 update std::string config 2017-03-05 18:19:49 +01:00
Daniel Marjamäki 339f861804 std.cfg: Configure return type for std::string::empty() 2017-03-05 11:07:14 +01:00
Daniel Marjamäki 2f2ac46243 Replaced hardcoding for char16_t and char32_t with configuration 2017-03-04 16:30:42 +01:00
VULCAIN\\Teddy 930aa3c5b2 Fixed #837 (configure istream::getline in std.cfg) Adds some rules for getline, get and readsome methods of std::istream class 2017-03-04 08:54:34 +01:00
orbitcowboy fef52f2ea1 windows.cfg: Added support for _mbsrchr(). 2017-02-23 13:43:30 +01:00
orbitcowboy beb72c2583 Revert changes from 9cb0941df2. 2017-02-02 15:53:52 +01:00
orbitcowboy 9cb0941df2 std.cfg: Take the return value from fread() into account. 2017-02-02 13:33:06 +01:00
amai2012 982991fabe #7878 FP : Buffer is accessed out of bounds when using strncmp() with short string literal. Correct std.cfg 2017-01-11 17:45:24 +01:00
Daniel Marjamäki c2a1c4056f astyle formatting
[ci skip]
2017-01-06 12:04:36 +01:00
alexander 8eeb09ba88 Add typeid to library 2017-01-05 20:38:56 +01:00
Daniel Marjamäki b9c65f0540 std.cfg: null pointer is allowed as first argument to wctomb 2016-12-20 16:08:28 +01:00
orbitcowboy f8cfa72159 std.cfg: Added support for C11 memcpy_s() and memcpy_s() functions. 2016-12-16 17:23:42 +01:00
orbitcowboy a694ebc602 std.cfg: Added a valid-tag for read streamsize. 2016-12-13 13:10:40 +01:00
orbitcowboy f89c606031 std.cfg: Added missing argument numbers to va_arg, va_copy, va_end and va_start. 2016-12-13 11:39:10 +01:00
orbitcowboy 3598f7f2ca std.cfg: Added more <valid>-tags. 2016-12-12 13:45:16 +01:00
orbitcowboy 1ee68a9d2a std.cfg: Added more <valid>-tags. 2016-12-12 13:35:41 +01:00
orbitcowboy c985723869 std.cfg: Added support for C11 function memset_s(). 2016-12-12 13:31:10 +01:00
orbitcowboy d6aef86d70 std.cfg: Added minsize configuration to strncmp() and wcsncmp(). 2016-12-12 11:12:30 +01:00
orbitcowboy 6829a8da14 posix.cfg and windows.cfg: Added support for memccpy(). 2016-12-05 16:46:49 +01:00
orbitcowboy 9b611f5351 std.cfg: Improved configuration by using <valid>-tags. 2016-12-05 09:48:20 +01:00
PKEuS 4a7b81218b std.cfg: Combined definitions of fget(w)c and get(w)c, removing wrong <use-retval/> from get(w)c 2016-11-29 09:37:00 +01:00
orbitcowboy fa379b50b1 std.cfg: Cleanup fget[w]c() configuration. 2016-11-28 11:19:36 +01:00
orbitcowboy 55ae961ac2 std.cfg and windows.cfg: Improved support for <use-retval/> for functions like ftell(), [f]get[w]c(). 2016-11-26 21:31:15 +01:00
orbitcowboy b0d09926fb std.cfg: Take return value into accoutn for ftell(). 2016-11-26 18:36:05 +01:00
orbitcowboy 97b8b1ffc2 std.cfg: Take return value into accoutn for freopen(). 2016-11-26 18:33:42 +01:00
orbitcowboy d5fb6da9a4 std.cfg: Ensure the return value of fopen_s() is taken into account. 2016-11-26 16:22:09 +01:00
orbitcowboy a4acfaa230 std.cfg: Added more <valid>-tags. 2016-11-08 09:36:24 +01:00
orbitcowboy 07aaf9999b std.cfg: Merged identical configurations. There are no functional changes. 2016-11-08 09:08:04 +01:00
orbitcowboy e3a9899983 std.cfg: Added <returnValue> support for wcslen(). 2016-11-08 09:05:17 +01:00
orbitcowboy d361ca7b61 std.cfg: Improved support for <returnValue> for functions like isalpha() etc. 2016-11-07 11:01:19 +01:00
orbitcowboy 0b643a2429 std.cfg: Use XML-CDATA sections to avoid usage of escape characters in <returnValue>-tags. 2016-11-07 09:43:42 +01:00
orbitcowboy ed453d24da std.cfg: Added returnValue support for iswdigit(). 2016-11-04 14:20:59 +01:00
orbitcowboy 75124317e9 std.cfg: Added returnValue support for iswblank(). 2016-11-04 14:03:48 +01:00
Daniel Marjamäki bd37504383 Updated std.cfg 2016-11-01 15:33:17 +01:00
Daniel Marjamäki dbb999fc13 Fix std.cfg 2016-11-01 15:19:24 +01:00
Daniel Marjamäki 0e9810b7f6 CheckStl: validation of iterators returned from functions 2016-11-01 14:08:42 +01:00
Daniel Marjamäki 7f71ad8360 Test std::find() 2016-11-01 12:25:23 +01:00
Boris Egorov 651148519e Fixes #7787 (Mistyped container number in std.cfg for std::equal etc.) 2016-10-31 17:38:40 +07:00
Daniel Marjamäki 9c1a08ca84 move std function information from checkstl to std.cfg 2016-10-27 19:24:24 +02:00
Daniel Marjamäki 77295a429e std.cfg: updated <returnValue> 2016-10-27 17:12:10 +02:00
Daniel Marjamäki fd3750820d std.cfg: configure some <algorithm> functions 2016-10-27 16:51:44 +02:00
Daniel Marjamäki f6a5f6bb61 CheckStl::mismatchingContainers: Refactoring, use Library instead of hardcoding 2016-10-27 10:25:45 +02:00
Daniel Marjamäki 08a618c476 Library: Add <iterator> element in <function> <arg>. Not used by any checks yet. 2016-10-25 23:07:18 +02:00
Daniel Marjamäki c8f831b70d Library: Allow that type of function return is specified. Fixes #7668. 2016-10-23 23:04:15 +02:00
orbitcowboy d5a145f288 std.cfg: Added <returnValue> information to isblank(). 2016-10-18 11:00:12 +02:00
orbitcowboy 56e75e5776 std.cfg: Added support <returnValue> support for imaxabs(). windows.cfg: Added support for _abs64(). 2016-10-17 14:31:44 +02:00
orbitcowboy 8a216ad87e std.cfg: Added <returnValue> support for labs() and llabs(). 2016-10-17 14:26:17 +02:00
Daniel Marjamäki fae4a4dacf Fixed #7668 (ValueFlow: return value from abs) 2016-10-17 13:05:19 +02:00
Daniel Marjamäki bc08aee9ca astyle 2016-08-27 15:09:45 +02:00
orbitcowboy 36ad0a0514 Fixed #7669 Extend support for C99 fixed width macro constants. 2016-08-27 10:11:46 +02:00
orbitcowboy 87409ea6b3 Running astyle; Improved testing of std::find; std.cfg: Added support for istream::read and ifstream::read. 2016-08-25 19:17:07 +02:00
orbitcowboy 8253a18646 windows.cfg and std.cfg: Improved support for vs[n]printf functions. 2016-08-11 11:45:59 +02:00
orbitcowboy db5e40b870 std.cfg: Added support for temnam_s; posix.cfg: Added support for fchmod. 2016-08-09 11:07:14 +02:00
orbitcowboy b0a502227c std.cfg: Added support for some fixed width integer sizes. 2016-08-08 15:18:05 +02:00
PKEuS 766e81cd97 std.cfg: vfwscanf takes three arguments 2016-08-06 13:38:51 +02:00
PKEuS 1a765213ad std.cfg: Removed <formatstr/> from v*scanf/printf functions. Added two C++17 functions to std::map container declaration. 2016-08-06 12:57:40 +02:00
PKEuS ded8d80b23 Library: Support arguments with default value. Fixed default value handling for <container> tags broken in last commit. 2016-07-09 12:44:17 +02:00
PKEuS 2d34acae71 Fixed configuration for fopen_s and similar functions (#7520) 2016-05-26 21:11:32 +02:00
orbitcowboy fd8fb9e4f4 cfg: Fixed FP recently introduced for fopen_s() and glob(). 2016-05-19 13:21:05 +02:00
orbitcowboy 5095196530 cfg: Ignore return values of fopen_s functions. 2016-05-19 11:56:52 +02:00
orbitcowboy 46adf180d7 cfg: Added support for fopen_s and sprintf_s functions. Fixed a wrong tests. 2016-05-18 09:31:26 +02:00
Alexander Mai e87ac14dd0 Correct FP due to configuration for mblen 2016-01-31 15:16:59 +01:00
orbitcowboy 1464990dad posix.cfg: Added more functions and comments. 2016-01-21 16:14:59 +01:00
PKEuS 8f641aaa76 Added gets_s() to std.cfg (C11), added <use-retval/> to min/max(). 2015-12-18 18:09:07 +01:00
orbitcowboy 4c60c2eaa5 std.cfg: Added min, max functions to std.cfg. 2015-12-18 16:09:26 +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
Daniel Marjamäki 094b4c8b6f astyle formatting
[ci skip]
2015-11-20 18:58:04 +01:00
PKEuS 6590d46013 Added missing functionality to <container> elements in Librarie, completed STL container definitions in std.cfg 2015-11-20 18:22:55 +01:00
PKEuS 53b2eca983 Reimplemented CheckStl::stlBoundaries() based on Libraries; Added support for iterators to libraries 2015-11-20 15:53:14 +01:00
Daniel Marjamäki ca8b15cd6b Fixed #7124 (int32_t etc are recognised as fundamental types, but std::int32_t etc are not) 2015-11-15 17:51:27 +01:00
PKEuS 25749ab19f Fixed another crash in clang test suite and let two times two functions in std.cfg share same configuration 2015-11-15 14:55:30 +01:00
PKEuS da6b17d176 Refactorizations in CheckStl:
- Improved detection of "auto" iterators in CheckStl::iterators()
- Improved performance of CheckStl::pushback()
- Added more containers to std.cfg
2015-11-15 14:04:39 +01:00
Daniel Marjamäki cf9f12130a Revert "std.cfg: Added std-namespace identifiers for <cstdint> types."
This reverts commit 00a47546f8.
2015-11-12 14:04:35 +01:00
orbitcowboy 00a47546f8 std.cfg: Added std-namespace identifiers for <cstdint> types. 2015-11-11 13:33:41 +01:00
Daniel Marjamäki 61cdd01ce3 std.cfg: fixed configuration for snprintf. destination string can be NULL. 2015-10-03 19:00:04 +02:00
Daniel Marjamäki 2420c8fc00 std.cfg: removed arg nr=any for formatstr functions. See #7012. 2015-10-03 18:54:57 +02:00
Daniel Marjamäki 28e3c266b3 Fixed #7012 (False positive uninitvar - first argument to snprintf) 2015-10-03 18:35:16 +02:00
Martin Ettl 12b4bf75e0 std.cfg: Fixed false negatives regarding uninitialized variable usage and added test cases. 2015-09-30 13:10:31 +02:00
Martin Ettl 0b782853fe Imroved std.cfg and added more test cases. 2015-09-30 12:45:40 +02:00
Martin Ettl 4fcd324ccd Improved testing of std.cfg regarding <arg nr=any> configured functions and added more test cases. 2015-09-30 12:18:56 +02:00
Martin Ettl c64f9cf9b1 #7012: Fixed FP in std.cfg by explicitly definining the first parameter of snprintf. 2015-09-29 21:33:39 +02:00
Martin Ettl 7476f0d1c2 std.cfg: Added support for wmemcmp() and corresponding test cases. 2015-09-23 22:46:36 +02:00
Martin Ettl 10da5d6d2f std.cfg: Added configuration for std::string:find. 2015-09-21 23:01:51 +02:00
Martin Ettl 3d0cc38d90 test/cfg: Attempt to fix travis build, caused by my previous commit due to wrong configuration. 2015-09-21 14:00:24 +02:00
Martin Ettl 55ccaea4a5 std.cfg: Added more functions from <cuchar> and corresponding test cases. 2015-09-21 13:40:56 +02:00
Martin Ettl 39622417b1 Improved std.cfg and added coressponding test cases to test/cfg. 2015-09-18 23:57:20 +02:00
Martin Ettl 841ad5462d test/cfg: Improved std.cfg and added corresponding test cases. 2015-09-18 23:02:51 +02:00
Martin Ettl fc4b9d320d test/cfg: Improved testing of std.cfg about std::stod(). 2015-09-18 16:25:05 +02:00
orbitcowboy fd81ee9804 test/cfg: Improved testing of std.cfg regarding uninitialized and nullPointer checks. 2015-09-11 16:50:59 +02:00
orbitcowboy 3187a2b972 test/cfg: Improved testing of std.cfg regarding null pointer dereferences. 2015-09-11 16:29:39 +02:00
Daniel Marjamäki e09f583096 GUI: library editor, edit function comments 2015-09-10 20:11:05 +02:00
orbitcowboy 5e50166135 Improved testing of std.cfg. 2015-09-10 16:45:14 +02:00
orbitcowboy 2b416419de test/cfg: Improved testing of std.cfg regarding uninitialized variables. 2015-09-09 16:59:26 +02:00
orbitcowboy 52090f5725 test/cfg: Improved testing of std.cfg regarding uninitialized variables. 2015-09-09 16:32:52 +02:00
orbitcowboy e929e9e7d9 test/cfg: Improved testing of std.cfg regarding uninitialized variables. 2015-09-08 16:08:43 +02:00
orbitcowboy 60770a8fdc test/cfg: Improved testing of std.cfg regarding uninitialized variables. 2015-09-08 15:43:22 +02:00
orbitcowboy 7d229f082c test/cfg: Improved testing of std.cfg regarding uninitialized variables. 2015-09-08 11:45:13 +02:00
orbitcowboy 03495360d8 test/cfg: Improved testing of std.cfg regarding uninitialized variables. 2015-09-07 16:57:34 +02:00
Daniel Marjamäki 0e5f7fe567 GUI: fixes to save cfg files properly in the library editor 2015-09-06 08:48:13 +02:00
Daniel Marjamäki c8662a7880 Reverted changes to std.cfg. It somehow causes test failures. 2015-09-05 20:36:22 +02:00
Daniel Marjamäki ff0f4cef16 GUI: Add handling of containers to CppcheckLibraryData 2015-09-05 20:13:26 +02:00
Alexander Mai b46df3d551 Correct attriutes for raise() in library 2015-09-05 16:58:46 +02:00
Alexander Mai 9255173267 Correct signal attributes in library 2015-09-05 13:09:56 +02:00
Alexander Mai d0ab00b100 Correct library std.cfg about setjmp 2015-09-05 07:00:22 +02:00
Martin Ettl bcb7dce97e Fix Travis build. 2015-09-04 23:50:50 +02:00
Martin Ettl 6304eb35f9 Improved testing of std.cfg regarding uninitialized variables. 2015-09-04 23:45:31 +02:00
Martin Ettl 27b3461e84 Fixed #6974 - false negative: uninitialized variable not detected (signal). 2015-09-04 22:48:00 +02:00
orbitcowboy 5428813534 Improved testing of std.cfg regarding uninitialized variables. 2015-09-04 11:59:19 +02:00
orbitcowboy c955fafd84 Improved testing of std.cfg regarding uninitialized variables. 2015-09-04 11:26:43 +02:00
orbitcowboy 9daf78527f Improved testing of std.cfg regarding uninitialized variables. 2015-09-03 16:34:44 +02:00
orbitcowboy b16a480dfe Merge branch 'master' of https://github.com/danmar/cppcheck 2015-09-03 16:03:23 +02:00
orbitcowboy 84d8a869d0 Improved testing of std.cfg regarding uninitialized variables. 2015-09-03 16:03:16 +02:00
Daniel Marjamäki 92d3510de4 std.cfg: Removed <noreturn>true</noreturn>
that was added in the previous commit by library editor
2015-09-03 08:26:47 +02:00
Daniel Marjamäki bfb70f3312 saving std.cfg with libraryeditor, applied some of the generated diffs. 2015-09-03 07:00:43 +02:00
orbitcowboy 34551203a6 Improved testing of std.cfg regarding uninitialized variables. 2015-09-02 17:08:25 +02:00
orbitcowboy 89c4e08fc4 Improved testing of std.cfg regarding uninitialized variables. 2015-09-02 15:43:52 +02:00
orbitcowboy 651e225069 Improved testing of std.cfg regarding uninitialized variables. 2015-09-02 12:00:03 +02:00
orbitcowboy d87d2ff779 Improved testing of std.cfg regarding uninitialized variables. 2015-09-01 16:50:36 +02:00
orbitcowboy c64e74492b Improved testing of std.cfg regarding uninitialized variables. 2015-09-01 11:59:24 +02:00
orbitcowboy 974414645a Improved testing of std.cfg regarding uninitialized variables. 2015-09-01 11:29:28 +02:00
orbitcowboy f24fdb4257 Improved testing of std.cfg. 2015-08-31 17:10:10 +02:00
orbitcowboy 0dd0f2a97d Improved testing of std.cfg and added more test cases. 2015-08-31 13:35:57 +02:00
orbitcowboy d1ba919e39 Improved testing of std.cfg regarding uninitialized variables. 2015-08-31 11:59:57 +02:00
orbitcowboy f653189bd4 Improved testing of std.cfg and added more test cases. 2015-08-31 11:39:25 +02:00
Martin Ettl 5e9325b4f4 test/cfg: Improved testing of std.cfg and added more test cases. 2015-08-30 12:05:38 +02:00
Martin Ettl 0e3b74fbbc test/cfg: Improved testing of std.cfg. Fixed false negatives by adding more stdandard namespace functions and test cases. 2015-08-29 01:43:17 +02:00
Martin Ettl 08413f0112 test/cfg: Improved testing of std.cfg. 2015-08-29 00:09:33 +02:00
orbitcowboy 994ba5d5a4 Improved testing of std.cfg. 2015-08-28 17:04:47 +02:00
Martin Ettl c26ec86508 std.cfg: Readded accidentially removed functions from <cfenv> and added test cases to test/cfg/std.cpp. 2015-08-16 15:05:42 +02:00
Martin Ettl 58d7b8a3f2 std.cfg: Added more test cases. 2015-08-16 14:49:35 +02:00
Martin Ettl 2665fb9481 std.cfg: Removed some non-existent functions that accidentially declared being in standard namespace. Improved testing of std.cfg functions. 2015-08-16 14:38:13 +02:00
Martin Ettl 7e189d6b91 std.cfg: Removed complex floating point podtypes. 2015-08-16 13:58:55 +02:00
Martin Ettl 1dca7c2162 std.cfg: Added float complex, double complex and long double complex as podtype. 2015-08-16 01:43:23 +02:00
Martin Ettl 716b4d6e18 Another attempt to fix the current travis build. Improved testing of std.cfg. 2015-08-16 01:21:11 +02:00
Martin Ettl ab0862f218 std.cfg: Fixed travis build. Added noreturn to the assert-definition in std.cfg. Improved testing of std.cfg. 2015-08-16 01:09:03 +02:00
Martin Ettl b2bf6cde5f std.cfg: Improved testing of libary functions. Removed some non existent such as std::sinf from the libary and added corresponding test cases to test/cfg/. 2015-08-16 00:52:52 +02:00
Daniel Marjamäki 3ccb2ba9da astyle formatting
[ci skip]
2015-08-15 14:26:50 +02:00
PKEuS aaefdd2f92 std.cfg: Unified comment style 2015-08-15 11:17:29 +02:00
PKEuS 5ca82b8c69 Refactorized std.cfg:
- Shrinked size of std.cfg by sharing same definitions for several similiar functions (for example round, roundf and roundl share the same definitions)
- Added a few more std::-overloads
- Fixed several typos
2015-08-15 11:17:29 +02:00
Martin Ettl e9b1f1f0a6 test/cfg/ Started to test std::complex functions. 2015-08-14 02:06:48 +02:00
PKEuS 4180ad38d4 Fixed bugs in std.cfg 2015-08-13 14:11:16 +02:00
Daniel Marjamäki c0998cbc11 std.cfg: add std:: functions 2015-08-13 11:03:21 +02:00
Daniel Marjamäki 8d79b9595e Merge pull request #638 from pepsiman/freopen
freopen does not allocate
2015-08-11 14:29:39 +02:00
PKEuS ebfdacb0d3 Introduced .cfg file format version to 2 (to prevent older cppcheck versions from failing silently when reading them), because 5b287fc849 introduced a backward-incompatible feature.
Increased format version of std.cfg, which is the only cfg file that makes use of the new backward incompatible feature.

Refactorization: Avoid a redundant std::string::find()-call
2015-08-11 14:05:01 +02:00
Malcolm Parsons fcea689a20 freopen does not allocate 2015-08-11 12:09:46 +01:00
Martin Ettl 797cac5098 Library: Started to test functions from std-namespace. 2015-08-10 23:44:36 +02:00
Daniel Marjamäki 5b287fc849 Library: The <function> name attribute can now have a comma separated list of names 2015-08-09 21:27:57 +02:00
Daniel Marjamäki b70fe4c609 Fixed #6711 (Add namespace support to library files) 2015-08-09 19:55:33 +02:00
Daniel Marjamäki bd56381fd2 Add configuration for div/ldiv/lldiv, 2nd argument must not be 0. 2015-07-30 14:08:59 +02:00
Alexander Mai 3c97736d44 Remove functions min()/max() from std.cfg (revert f430748) 2015-05-13 21:25:04 +02:00
orbitcowboy f430748e0c std.cfg: Added support for min() and max() functions. 2015-05-07 08:45:38 +02:00
Alexander Mai 97f998e6dd Remove <use-retval/> attribute from strto*() APIs fixing false positives 2015-05-03 16:38:13 +02:00
Daniel Marjamäki 88a6c2bf9d std.cfg: Added <strz/> configurations 2015-05-03 16:04:15 +02:00
Martin Ettl b5f20be151 std.cfg: Improved matching of functions. Improved documentation. 2015-04-05 22:48:53 +02:00
Martin Ettl a16ed8f0e7 posix.cfg: Added support for more functions. std.cfg: Fixed mktime->mkxtime wrong naming and improved asctime() function checking. It is not allowed to provide a NULL pointer to asctime(). 2015-04-04 23:59:05 +02:00
Martin Ettl c89d2b16cc std.cfg: Improved function matching of strto* functions. 2015-04-04 22:59:58 +02:00
Martin Ettl 19e4c8bed0 std.cfg: Added support for functions from <iomanip>. 2015-04-04 22:42:12 +02:00
Daniel Marjamäki a24891f335 std.cfg: Add <not-null/> to atoll 2015-02-26 20:14:20 +01:00
Daniel Marjamäki 18285eadc7 std.cfg: Add <not-null/> to atof/atoi/atol 2015-02-26 19:47:05 +01:00
Alexander Mai cea71f8625 Fix false positive ignoredReturnValue about strtol 2015-02-25 22:03:10 +01:00
Alexander Mai fd7d29447d std.cfg: snprintf(NULL,0,) is legal. Fix some testcases in test/cfg as well 2015-02-22 14:25:25 +01:00
Daniel Marjamäki 2d21eb07ba Cleaned up snprintf hardcoding in CheckBufferOverrun 2015-02-13 06:44:38 +01:00
Daniel Marjamäki 9aad4fa8ca CheckBufferOverrun: Remove hardcoding for sprintf and rely on cfg configuration instead 2015-02-12 17:29:36 +01:00
Daniel Marjamäki 3285f85ebf Fixed #6460 (Library: better function/type matching) 2015-01-27 17:55:18 +01:00
orbitcowboy 3aa4f5de47 std.cfg: Fixed from spelled podtype win_t --> wint_t 2015-01-27 07:57:20 +01:00
Daniel Marjamäki f1e7d7894f std.cfg: arguments for rename/remove must be zero-terminated strings 2015-01-27 06:20:46 +01:00
orbitcowboy d2b9abc4d3 std.cfg: Added missing podtypes. Fixed a FP when in fgetpos(). The second parameter is allowed to be uninitialized. 2015-01-26 11:52:41 +01:00
orbitcowboy 07ae1d4278 posix.cfg: Added support for 'DIR' dataype. 2015-01-26 08:49:35 +01:00
Martin Ettl e5c7766293 posix.cfg and std.cfg: Added missing type definitions. 2015-01-23 18:15:03 +01:00
PKEuS 60b2b655df Support new/delete in new uninitialized variable checking; realloc() requires an initialized first argument. 2015-01-21 23:46:52 +01:00
orbitcowboy 81aaa02c76 std.cfg: Added support for swprintf(). 2015-01-19 14:30:58 +01:00
orbitcowboy 91d58a51cb std.cfg: wcsrtombs() is allowed to have a NULL pointer as first argument. 2015-01-19 13:21:47 +01:00
orbitcowboy 7c737f0350 std.cfg: Added more functions and improved documentation. 2015-01-19 11:55:16 +01:00
Martin Ettl e7a95e68ac std.cfg: Improved documentation. No functional changes. [ci skip] 2015-01-18 16:11:20 +01:00
Martin Ettl 4294e7a2d9 std.cfg: Improved documentation and added support for more functions. 2015-01-18 15:31:16 +01:00
Martin Ettl 8dab677eac std.cfg: Improved documentation and added ilogb function support. 2015-01-18 15:05:06 +01:00
Martin Ettl 7c91dd2da6 std.cfg: Improved function support and documentation. 2015-01-18 14:37:07 +01:00
Martin Ettl b23772381d std.cfg: Improved support for math functions. 2015-01-18 13:35:40 +01:00
orbitcowboy 42397ee8cb std.cfg: Improved support for <cwchar> (wchar.h). 2015-01-15 23:14:10 +01:00
orbitcowboy 4e549d7d22 std.cfg: Fixed typo in previous commit, where support for wcsftime() from <cwchar> (wchar.h) was added. 2015-01-15 21:11:21 +01:00
orbitcowboy fb984ab5e9 std.cfg: Added support for wcsftime() from <cwchar> (wchar.h). 2015-01-15 21:09:55 +01:00
orbitcowboy 4b71e5f9cb std.cfg: Improved support for complex.h functions and improved documentation. 2015-01-15 15:25:50 +01:00
orbitcowboy 4222333785 std.cfg: Added documentation to some functions. 2015-01-15 10:43:15 +01:00
orbitcowboy 823af34c67 std.cfg: Added support for <cwtype> (wtype.h) functions. 2015-01-14 06:54:35 +01:00
orbitcowboy c4fc2181a7 std.cfg: Added support for <csignal> (signal.h) functions. 2015-01-13 23:13:25 +01:00
orbitcowboy da1389880a std.cfg: Documented <csetjmp> (setjmp.h) functions. No functional changes. 2015-01-13 21:55:43 +01:00
orbitcowboy b10a082ba5 std.cfg: Added support for <clocale> (locale.h) functions. 2015-01-13 21:49:08 +01:00
orbitcowboy c8678c90f4 std.cfg: Fixed missing attributes of <ctime> (time.h) functions. 2015-01-13 19:29:44 +01:00
orbitcowboy 3f6933c7e3 std.cfg: Added support for <cfenv> (fenv.h) functions. 2015-01-13 19:21:22 +01:00
Martin Ettl 6f000fb16b Fixed #6407: Add support for C++11 float_t and double_t types. 2015-01-11 09:58:15 +01:00
Alexander Mai b30f03709a Remove <use-retval/> for feclearexcept() and getwchar() 2015-01-10 18:16:07 +01:00
PKEuS c4269b3b44 Fixed #6390, strncmp and similar functions are <pure/> 2015-01-09 14:35:12 +01:00
orbitcowboy a5e3f2889c std.cfg: Added functions from <cfenv>. 2015-01-09 13:39:46 +01:00
orbitcowboy 85bca7e22f std.cfg: Improved documentation for some functions. No functional changes. 2015-01-07 20:15:08 +01:00
orbitcowboy 346ec0e7e9 std.cfg: Added support for <cmath> functions. 2015-01-07 14:02:33 +01:00
orbitcowboy 64d81a6552 std.cfg: Improved <cstring> function strerror. 2015-01-07 10:29:53 +01:00
orbitcowboy fa5375bf94 Added more functions from <cwchar> to std.cfg. 2015-01-07 10:16:58 +01:00
orbitcowboy fd9134fe5b Added more functions to std.cfg from <cwchar> (wchar.h). 2015-01-07 03:08:34 +01:00
orbitcowboy ba837a6f2d Added support for strpbrk to std.cfg. Running astyle. 2015-01-07 02:34:41 +01:00
Daniel Marjamäki f998871d59 astyle formatting 2015-01-04 13:51:49 +01:00
PKEuS e06a4cdf00 Refactorized CheckStl::if_find():
- Added support for find()-like functions to Library::Container
- Use <container> information from library
- Fixed false positive #6402
2015-01-04 12:43:50 +01:00
PKEuS e39729ffcc Library: Add <container> tag to Libraries, provide configuration for std::vector, std::deque, std::array and STL strings
Token: Added function to jump to the next template argument
2015-01-03 22:18:33 +01:00
PKEuS 520424324d Fixed wrong configuration of modf in std.cfg (#6312) 2014-12-10 16:33:04 +01:00
Alexander Mai d11eb4931a #6306 false positive with strxfrm NULL argument. Adjust std.cfg in favor of no false positive 2014-12-07 15:24:27 +01:00
Alexander Mai a2f669eff7 Using the return value of strtok() is not mandatory since it the first argument may be modified (fixing a FP in LibreOffice) 2014-10-18 08:29:42 +02:00
Daniel Marjamäki 44420bdbf1 cfg: formatted the cfg files with the runastyle script 2014-10-14 06:46:47 +02:00
PKEuS 374ea8f039 Fixed false positive ignoredReturnValue on unknown member function log() (#6197) 2014-09-29 19:55:32 +02:00
PKEuS cbb8360b30 Added version attribute to .cfg files (#5928) 2014-09-29 16:26:17 +02:00
PKEuS df01bf5006 Fixed false positive introduced recently: return value of time() does not need to be taken 2014-09-28 10:04:33 +02:00
PKEuS 210294443e New check: Check for unused return values (#653) 2014-09-27 21:31:04 +02:00
Alexander Mai b0c34390cd Fix FP: tmpnam() expects a valid pointer, an uninitialized array (of conforming size) is fine 2014-09-27 20:29:54 +02:00
Alexander Mai 98d4c944e3 #6163 False nullPointer for strtok(NULL, ...). Correct std.cfg 2014-09-15 20:57:34 +02:00
PKEuS 6c2943d33d Extended std.cfg 2014-09-11 21:37:39 +02:00
PKEuS fd2346e4ec Added strtok and assert to std.cfg 2014-09-11 20:27:04 +02:00
PKEuS a0d8fc1df4 Fixed 32 wrongly configured functions (#6120) and added support for second argument of strchr() to std.cfg. 2014-09-02 17:55:59 +02:00
PKEuS f717f4c6b8 Set <pure/> attribute for various functions in std.cfg 2014-09-02 13:39:34 +02:00
Alexander Mai f94e208862 #6116 False positive uninitvar - first argument to wcstombs(). Correct stf.cfg 2014-09-01 19:53:24 +02:00
PKEuS 40e5dab9dc Refactorization in checkmemoryleak.cpp:
- Use Library to detect noreturn/notnoreturn functions
- Removed realloc from std.cfg as long as there is no proper way to configure such functions
2014-09-01 13:54:33 +02:00
Alexander Mai 3aeecb8a05 #6100 False positive nullPointer - calling mbstowcs(NULL,). wcstombs has also been fixed 2014-08-27 19:32:53 +02:00
Daniel Marjamäki d414aa0ae5 astyle formatting 2014-08-15 16:01:48 +02:00
Daniel Marjamäki a3acc3241e Library: Added <minsize> element used for buffer overrun checking 2014-07-05 20:31:43 +02:00
PKEuS 220f7503ce Fixed wrong configuration of itoa in std.cfg 2014-07-01 19:25:26 +02:00
orbitcowboy d19b6f181d Extended std.cfg, posix.cfg and avr.cfg 2014-06-25 15:09:03 +02:00
orbitcowboy c7310c0ab0 std.cfg: Added support for more functions. 2014-06-25 14:27:01 +02:00
orbitcowboy 95c49ec5dc Extended std.cfg about more missing functions. Moved POSIX functions to posix.cfg. Extended posix.cfg about more memory allocating functions. 2014-06-25 12:00:24 +02:00
PKEuS ac4e727da7 Removed redundant code (replaced by libaries, should fix #5934). 2014-06-24 21:57:19 +02:00
orbitcowboy 731180b7dd std.cfg: Added support for qsort and improved stro* functions. 2014-06-24 14:16:54 +02:00
orbitcowboy 0a17473962 std.cfg: Added support for bsearch. 2014-06-23 14:43:56 +02:00
orbitcowboy f90445e947 Extended std.cfg and avr.cfg about more functions. 2014-06-23 14:15:47 +02:00
orbitcowboy f57e875351 Astyle run; Extended std.cfg and avr.cfg about a few more functions. 2014-06-23 11:59:14 +02:00
orbitcowboy 2255ece5c5 Extended std.cfg about alloca function and avr.cfg about a few definitions. 2014-06-17 17:00:27 +02:00
Daniel Marjamäki 977af89fa9 std.cfg: configure standard types 2014-06-12 06:43:19 +02:00
Daniel Marjamäki 42c3b3c89d Library: Change range operator in validation pattern to ':' 2014-06-08 18:12:11 +02:00
Daniel Marjamäki 8e13c74695 Fixed #5778 (False positive: Deallocating a deallocated pointer when exit function is called) 2014-05-10 21:26:27 +02:00
orbitcowboy baf8d09a0d Fixed FP for nullpointer dereference when using putchar. 2014-04-09 17:02:17 +02:00
orbitcowboy dd61c5db47 Fixed FP, nullpointer for memchr. 2014-04-08 18:39:50 +02:00
unknown 9ae59290dd #5645 False positive Null pointer derefence about first argument to fputc() 2014-04-07 12:08:34 +02:00
orbitcowboy 1cda2f9fc8 Fixed #5636: extended std.cfg, abs() about <not-bool/>. 2014-04-02 02:03:10 +02:00
Daniel Marjamäki 6a5617e552 runastyle 2014-03-23 20:01:24 +01:00
Martin Ettl 7e74ecca76 std.cfg: Added support for more C-functions. 2014-03-22 03:27:00 +01:00
Martin Ettl 3074b38dca std.cfg: Improved checking of memset. Added a constraint for the second parameter and do not all uninitialized usage. 2014-03-22 03:12:23 +01:00
Daniel Marjamäki 94476e387e astyle formatting 2014-03-22 18:43:57 +01:00
Martin Ettl 2ecfb388d3 std.cfg: Removed checking second parameter of memset and probably fixing Travis failing. 2014-03-21 23:26:33 +01:00
Martin Ettl d160aef818 std.cfg: Fixed wrong second parameter of memset. It is allowed to be zero. 2014-03-21 23:04:29 +01:00
Martin Ettl d98eaa599f std.cfg: removed duplicate entries. 2014-03-21 22:46:05 +01:00
Martin Ettl 6da678b4e8 Added more functions to std.cfg. 2014-03-21 22:39:57 +01:00
Martin Ettl 51ef7e118a Astyle running. 2014-03-21 21:37:09 +01:00
Martin Ettl 0f5d30c724 Extended std.cfg about more functions. 2014-03-21 21:31:12 +01:00
Martin Ettl cae9ea1403 Added more functions to std.cfg 2014-03-21 17:58:19 +01:00
Martin Ettl e00f50b850 Fixed #5597 and added abort() support to stdcfg. 2014-03-21 17:36:48 +01:00
orbitcowboy 1efcd670a1 Added support for exit() to std.cfg. 2014-03-20 06:49:44 +01:00
orbitcowboy 6507824a34 Added support for putchar() to std.cfg. 2014-03-20 05:49:38 +01:00
Daniel Marjamäki 430d6d398c Merge pull request #273 from matthiaskrgr/strip_whitespace
runastyle: add line which strips trailing whitspaces from cfg files (and run it on the files)
2014-03-21 11:24:59 +01:00
Matthias Krüger e8dd3e83cf runastyle: add line which strips trailing whitspaces from cfg files (and run it on the files) 2014-03-21 01:28:40 +01:00
orbitcowboy 80e3b49cfc Added support for ftell() and puts() to std.cfg. 2014-03-20 04:10:41 +01:00
orbitcowboy 30006cf06f Added support for fputs() to std.cfg. 2014-03-20 02:13:41 +01:00
orbitcowboy b37e9601c1 Added support for fgetc() to std.cfg. 2014-03-20 00:59:52 +01:00
XhmikosR be0fcefe1d Tabs to spaces.
[ci skip]
2014-03-20 09:02:14 +02:00
Martin Ettl fe1b46c174 Extended std.cfg 2014-03-19 21:08:48 +01:00
Martin Ettl 26af1a232a Extended std.cfg about <cstring> functions and added testcases. 2014-03-10 02:12:32 +01:00
Alexander Mai 2a2e634662 Fixed #3145 (False negative: no memory leak warning - return value of realloc(NULL,) ignored) 2014-03-16 10:15:14 +01:00
Daniel Marjamäki ce1aa1e011 Library: I had misunderstood const/pure a little so I corrected cfg and code 2014-03-14 20:08:34 +01:00
Martin Ettl b8a1ca29d1 Fixed #5564 (extend std.cfg about missing functions: isalpha, tolower and toupper functions) 2014-03-14 17:42:19 +01:00
Daniel Marjamäki 8d8913a168 Partial fix for #5555. Add const,pure attributes to library. 2014-03-14 06:38:45 +01:00
Alexander Mai 29d401ff38 Fixed #3098 (false negative: unitialized variable being passed to strcoll()) 2014-03-06 16:31:31 +01:00
Alexander Mai 1d4839b8a6 Fixed #1374 (false negative: using uninitialized variable in printf) 2014-03-06 06:16:14 +01:00
Daniel Marjamäki b8b573321e CheckNullPointer: Update std.cfg and test that updates are correct 2014-01-27 17:33:16 +01:00
Daniel Marjamäki 0c47555423 CheckNullPointer: use library instead of hard coded info 2014-01-26 16:19:49 +01:00
PKEuS b775714e3d Moved several hardcoded function names in format string checking into libraries (std.cfg and windows.cfg).
Added support for loading a library in test suite.
2014-01-12 03:44:24 -08:00
Daniel Marjamäki 253c4fef49 Fixed #5331 (std.cfg: 'isalpha' is misspelled) 2014-01-09 15:44:42 +01:00
Daniel Marjamäki ac30a84c3a Refactoring: Replaced CheckOther::checkCCTypeFunctions with configuration 2013-12-23 19:58:33 +01:00
Daniel Marjamäki 76b907fe65 Fixed #5252 (Improve check: use Library to validate function arguments in invalidFunctionUsage) 2013-12-23 10:06:45 +01:00
Daniel Marjamäki 07948677f8 Fixed #5247 (FP: Memory is allocated but not initialized for FILE*) 2013-12-21 13:32:59 +01:00
Daniel Marjamäki c8a5811b92 cfg/std.cfg: removed <leak-ignore/> from fopen and fclose configurations as this cause FP 2013-12-12 12:31:47 +01:00
Daniel Marjamäki 72111d0292 cfg/std.cfg: added configuration about some standard functions 2013-11-23 18:18:01 +01:00
Daniel Marjamäki 0c5e39a813 Library: Added configuration file std.cfg that clients should load. 2013-07-20 17:12:56 +02:00