Commit Graph

617 Commits

Author SHA1 Message Date
orbitcowboy 7ac3bf5fd8 std.cfg: Removed MIN/MAX macros since they cause problems with http://cppcheck.osuosl.org:8000/amap-align 2019-04-03 09:11:48 +02:00
Daniel Marjamäki b88cc7c19d Fix std.cfg 2019-04-01 20:28:31 +02:00
Daniel Marjamäki 761f18c75c Fixed #8988 (False positive: using memset on struct) 2019-04-01 19:32:03 +02:00
versat 316475f79f std.cfg: Add "buffer-size" attribute and tests for aligned_alloc(). 2019-03-21 09:25:42 +01:00
Sebastian 432c04281a
Libraries: Move valloc() from std.cfg to posix.cfg. (#1743)
Move valloc() to posix.cfg since it is a legacy POSIX function and not
part of the standard (not even commonly used). It is not available in
msvc (Visual Studio).
2019-03-20 14:10:36 +01:00
Daniel Marjamäki 14528bcf25 Library: allowed values for the buffer-size attribute: malloc/calloc/strdup 2019-03-20 06:46:55 +01:00
Daniel Marjamäki 18668a52b9 Library: Added buffer-size attribute for <alloc> 2019-03-17 10:55:15 +01:00
orbitcowboy f449e75214 std.cfg: Added support for std::getline(). 2019-03-11 15:32:15 +01:00
Sebastian 0bab9d778b
std.cfg: Fix wprintf(), add comment to swprintf(). (#1729)
wprintf(): The format string must be initialized. So add `<not-uninit/>`
swprintf(): `<formatstr/>` should not be used because Microsoft uses the
same function with a different order of the arguments. Add comment to
document this in the library configuration also. See ticket
https://trac.cppcheck.net/ticket/4790
2019-03-06 21:13:48 +01:00
orbitcowboy 8c0ab16863 std.cfg: Added support for more interfaces. 2019-03-05 18:13:42 +01:00
versat df73f7f355 std.cfg, windows.cfg: Move strcpy_s from windows.cfg to std.cfg.
strcpy_s belongs to the standard so it must be in std.cfg instead of
windows.cfg.
Configuration for strcpy_s has been improved and tests were added.
Found by daca@home
2019-03-05 15:33:16 +01:00
versat 0ae24b950f std.cfg: Add support for snprintf_s().
sprintf_s works very similar but it is already configured in the
windows library. Configuring sprintf_s in std.cfg leads to conflicts in
the windows configuration tests.
Found by daca@home
2019-03-05 14:44:33 +01:00
versat ce818631ab std.cfg: Add support for ctime_s(). 2019-03-05 13:57:52 +01:00
Sebastian 9efb720a98
std.cfg: Add missing argument directions as far as possible. (#1725)
I added all argument directions i know or where i was able to find
information without too much effort. When in doubt i looked at the
Microsoft SAL annotations and used similar configurations when this
made sense.
2019-03-05 13:45:41 +01:00
Sebastian 0934577dda
Library configuration: function argument direction fixes and enhancements (#1722)
* std.cfg: Add further argument directions (in, out, inout).

* testlibrary.cpp: Add test for function argument direction configuration.

* std.cfg: runastyle and add some more direction configurations.

* library.h: Add documentation for function argument direction enum.

* Do not use "direction" library information for pointer arguments.

Also fix further unmatched uninitvar messages in std configuration
tests.

* std.cfg: Add more argument direction configurations.

* test/cfg/std.c: Add test for argument direction configuration.

* astutils.cpp: Only ignore pointer arguments for out/inout arguments.

* library.h: Use suggested documentation for argument direction enum.
2019-03-04 22:57:40 +01:00
Sebastian 9a5fcddb5d
Library configuration: Enable configuring the direction of arguments. (#1717)
This enhances the library configuration so the direction of function
arguments can be specified (in, out, inout).
isVariableChangedByFunctionCall() uses this information now to avoid
guessing.
2019-03-01 15:47:08 +01:00
orbitcowboy aa4265978c std.cfg: Added support for std::list::remove(). 2019-03-01 15:10:36 +01:00
orbitcowboy 16e3a0ada6 std.cfg: Added support for std::shuffle() and std::random_shuffle(). 2019-03-01 15:05:10 +01:00
orbitcowboy 9348a627e0 std.cfg: Added support for more interfaces. 2019-03-01 09:28:46 +01:00
orbitcowboy 2fad53e4f8 std.cfg: Enusre the return value of realloc()-functions is taken into account. 2019-03-01 08:57:59 +01:00
orbitcowboy f70e01b2b1 std.cfg: Added (experimental) support for MIN/MAX-macros. In case it turnes out this causes unexpected side effects, they can be easily removed. 2019-02-28 23:03:38 +01:00
Sebastian 71b1b2dd76
std.cfg: Add support for std::vector::assign(). (#1713)
Reference:
https://en.cppreference.com/w/cpp/container/vector/assign
2019-02-28 18:43:54 +01:00
Sebastian 13b37631a6
std.cfg: Add support for std::vector::swap() and std::swap() (#1700)
References:
https://en.cppreference.com/w/cpp/container/vector/swap
https://en.cppreference.com/w/cpp/algorithm/swap
2019-02-26 18:21:17 +01:00
orbitcowboy d218fa5919 std.cfg: Added support for more interfaces. 2019-02-24 18:43:07 +01:00
orbitcowboy 406b29548a std.cfg: Added support for more interfaces. 2019-02-24 18:35:02 +01:00
orbitcowboy 32e1d383a4 std.cfg: Added support for std::replace() and std::replace_if(). 2019-02-24 00:06:38 +01:00
orbitcowboy 748fe7f25e std.cfg: Added support for std::back_inserter(). 2019-02-24 00:00:20 +01:00
orbitcowboy c38cbd967b std.cfg: Added support for std::reverse(). 2019-02-23 23:55:13 +01:00
orbitcowboy 59d3ce2343 std.cfg: Added support for std::remove_if(). 2019-02-23 23:51:11 +01:00
orbitcowboy 568887eadf std.cfg: Added support for std::unique(). 2019-02-23 23:44:23 +01:00
orbitcowboy 0fa70ebb2a std.cfg: Added support for more interfaces. 2019-02-23 18:38:48 +01:00
orbitcowboy 216d324a59 std.cfg: Added support for more interfaces. 2019-02-23 18:35:13 +01:00
orbitcowboy af9cbe23f9 std.cfg: Added support for more interfaces. 2019-02-20 10:02:01 +01:00
orbitcowboy a7b9d8de1b std.cfg: Added support for std::ios_base::setf() and std::ostringstream::setf(). 2019-02-18 12:20:34 +01:00
orbitcowboy 5135cbeecd std.cfg: Added support for std::multiset::insert(). 2019-02-17 23:15:46 +01:00
orbitcowboy 3aa131470b std.cfg: Added support for std::vector::erase(). 2019-02-17 23:10:17 +01:00
orbitcowboy af4f3af851 std.cfg: Added support for std::fill(). 2019-02-17 22:58:30 +01:00
orbitcowboy c28abe7e35 std.cfg: Added support for std::map::insert(). 2019-02-17 22:50:18 +01:00
orbitcowboy 1df9c80e81 std.cfg: Added support for std::move(). 2019-02-17 22:45:45 +01:00
orbitcowboy 7629923b65 std.cfg: Attempt make travis happy. 2019-02-16 08:24:53 +01:00
orbitcowboy 437e171d0d std.cfg: Added partial support for std::transform(). 2019-02-15 20:56:44 +01:00
orbitcowboy 23b771c5c8 std.cfg: Added partial support for std::sort(). 2019-02-15 20:45:46 +01:00
orbitcowboy 103ec5b5a1 std.cfg: Added support for std::wifstream::seekg(). 2019-02-13 08:52:45 +01:00
orbitcowboy 81dab88413 std.cfg: Fixed wrong configuration from std::vector::pop_back(). 2019-02-13 08:04:11 +01:00
orbitcowboy 40398c6c90 std.cfg: Added support for std::vector::pop_back() and std::vector::push_back (). 2019-02-12 18:52:18 +01:00
Sebastian d9241aa532
std.cfg: Add support for std::string::replace() (#1661)
Reference: https://en.cppreference.com/w/cpp/string/basic_string/replace
2019-02-11 16:06:48 +01:00
Sebastian 3427e61383
std.cfg: Add support for std::string::assign() (#1660)
Reference: https://en.cppreference.com/w/cpp/string/basic_string/assign
2019-02-11 13:40:36 +01:00
orbitcowboy 1ddaa1ecf3 std.cfg: Added support for std::ifstream::seekg() and std::istream::seekg(). 2019-02-09 17:13:07 +01:00
orbitcowboy d2732e9459 std.cfg: std::string::append() added 'arg nr any'. 2019-02-09 16:58:33 +01:00
orbitcowboy 2408096cc8 std.cfg: Added support for std::string::append(). 2019-02-09 16:43:08 +01:00
Sebastian fc7494c832 std.cfg: Add support for std::map::count() (#1655)
Reference: https://en.cppreference.com/w/cpp/container/map/count
2019-02-09 09:20:42 +01:00
Daniel Marjamäki e6e3987935 snprintf/g_snprintf: do not allow uninitialized target buffer 2018-12-22 20:40:47 +01:00
orbitcowboy 4c57f0d33c std.cfg: Improved support for std::lower_bound() and std::upper_bound(). 2018-11-27 13:55:06 +01:00
orbitcowboy b4aa04db41 std.cfg: Added returnValue calculation for isless(), islessgreater() etc. 2018-11-20 16:58:33 +01:00
orbitcowboy a722ba4f89 std.cfg: Improved return value configuration for std::min() and std::max(). 2018-11-20 16:07:16 +01:00
orbitcowboy 58b3d75b62 std.cfg: Added invalidFunctionArg cfg for strchr(). 2018-11-20 08:32:54 +01:00
yurii.putin 2aecd30cd8 Change cfg
Add some function (posix_memalign, reallocarray,aligned_alloc,valloc) to cfg. Add attribute format-str to some function.
2018-11-19 18:23:00 +01:00
Daniel Marjamäki 142f921d52 remove <pure/> from strtok. It has an internal state. This fixes FPs. 2018-09-08 12:08:09 +02:00
rikardfalkeborn 30a8d953e3 Move sqrt{,f,l} argument checks to cfg file (#1313) 2018-07-20 20:56:39 +02:00
rikardfalkeborn 491ee577c6 Support floats in valid config (#1297)
* Add tests for invalid ranges

* Refactor loadLibErrors

This reduces the amount of code slightly and will simplify adding
more tests.

* Handle empty valid field

Before this change, the sequence <valid></valid> in a config file would
result in a segmentation fault. Now an empty field results in the error
message:

cppcheck: Failed to load library configuration file 'mycfg.cfg'. Bad attribute value '""'

* Add support for valid for floating point arguments

Previously, it was not possible to add valid ranges to floating point
arguments since it only handled integers. This made ranges not work well
for floating point arguments since arguments were cast to integers
before the ranges were handled.

Fix this by using doubles instead of integers if the argument is a float.
Add some tests for this and make sure errors are printed with enough
precision (somewhat arbitrarily chosen).

Note that it is still only possible to add integer ranges (i.e. -1:1).

* Add support for floats in configuration valid range

Now that it is possible to handle decimal arguments, there is no reason
to not allow non-integer ranges. Take care to not allow broken
configurations.

* Move check to within if-clause

* Move asin{,f,l} and acos{,f,l} input checks to config file
2018-07-15 22:47:56 +02:00
orbitcowboy 8472779c00 std.cfg: Added support for wcsncpy_s(). 2018-06-07 11:57:03 +02:00
orbitcowboy fe8cab1749 Removed platform specifc constants from previous commit. 2018-06-01 12:07:46 +02:00
orbitcowboy 34372aaf00 std.cfg: Added some floating point constants from <math.h>. 2018-06-01 11:45:05 +02:00
Daniel Marjamäki f326021a75 std.cfg: strncpy_s wrongly had <not-uninit/> in first argument 2018-05-31 07:03:07 +02:00
orbitcowboy 39feb150c0 std.cfg and windows.cfg: Added support for wcscat_s() and _tcscat_s(). 2018-05-30 16:25:09 +02:00
orbitcowboy ef82477d11 std.cfg: Do not take the return value of std::locale::global() into account. 2018-05-30 16:04:40 +02:00
orbitcowboy d06eb3eb8f std.cfg: Added support for strcat_s() (since C11). 2018-05-30 14:30:26 +02:00
Sebastian fdc98e5665
std.cfg: Add rsize_t and errno_t configurations. (#1229) 2018-05-16 10:12:37 +02:00
Sebastian 6208ee4af1 std.cfg: Add asctime_s function configuration with tests (#1191)
* std.cfg: Add asctime_s function configuration with tests

* std.cfg: Remove redundant/not needed not-bool attributes.
2018-04-27 23:51:16 +02:00
Sebastian 4b104c4576
std.cfg: Add some missing C++11 declarations comments and not-bool attributes (#1183) 2018-04-25 08:54:36 +02:00
Sebastian 038064436d std.cfg: Fix minsize configuration for vsprintf (#1188)
minsize with argvalue for arg 2 which is a char pointer makes no sense.
Changing it to minsize with strlen for arg 2 results in false positives
(and i think false negatives too).
In std.c a test with a valid vsprintf usage is added that would result
in a FP when minsize with strlen for arg 2 would be used.
2018-04-25 02:52:19 +02:00
Sebastian b53c4b2032 std.cfg: Add std::vector function configurations and tests (#1180) 2018-04-19 16:41:25 +02:00
Sebastian a36dad918a std.cfg: Add std::make_pair() (#1165) 2018-04-11 19:16:55 +02:00
orbitcowboy ef62207ada std.cfg: Added more tests for some std::vector functions. 2018-04-11 17:21:26 +02:00
Sebastian 3fc53eb122 std.cfg: Add std::[w]string::compare() with tests (#1162) 2018-04-10 21:07:39 +02:00
Sebastian d3284d5d54 std.cfg: Add strncpy_s and strncat_s (#1136) 2018-03-26 18:38:26 +02:00
Sebastian 670267f3d1 std.cfg: Smaller enhancements and fixes (#1133)
Add missing returnValue types where appropriate and fixed a few wrong
ones.
Add some missing function names (mostly where the "std::" version of the
function is missing).
Add documentation for some functions where it is missing.
Remove functions that do not exist in the standard: std::array::clear,
std::vector::push_front.
2018-03-23 22:58:20 +01:00
Paul Fultz II 4ef445e228 Add const to empty and size functions (#1124) 2018-03-19 09:58:22 +01:00
Daniel Marjamäki 7d0b5f7c8d std.cfg: allow std::string::find() argument '\0' 2018-03-19 09:43:15 +01:00
Sebastian 51fce24d95 std.cfg: Add offsetof configuration (#1097) 2018-02-23 18:49:52 +01:00
orbitcowboy 2ab347606a std.cfg: Improved support for some std::ofstream functions. 2018-02-20 22:36:45 +01:00
orbitcowboy 31399e556b std.cfg: Improved configuration for ptrdiff_t. 2018-02-20 01:00:12 +01:00
Sebastian 9eb6d38c06 std library: Add tests for wide character string functions, fix config (#1085)
Add equivalent tests for the wide character string functions like they
are already done for the normal string functions.
Fixed some issues with the configuration of the wide character string
functions that arised through the tests and were already fixed for the
normal string functions.
2018-02-09 21:17:01 +01:00
orbitcowboy ff3c0993ac std.cfg: Fixed FP for wcsxfrm(), mentioned in #6306. 2018-02-05 22:13:08 +01:00
Sebastian 4b5e4f989a std config: Remove misspelled function "strbprk" (#1065)
Remove misspelled function configuration "strbprk" (also from the
tests). The correct function "strpbrk" is already configured and tested.
2018-01-29 17:28:44 +01:00
Sebastian 6b5805041b std.cfg: Fixed remaining functions found to be redundant (#1055)
[std::]strtoimax and [std::]strtoumax:
They were nearly completely duplicates, i removed the ones with
less/missing configuration.
std::basic_string::empty:
It was found to be redundant because very likely someone forgot to
change "empty" to "clear" when copy&pasting the function names. The
empty function in all these clear functions makes no sense, and the
clear function also was missing.
std::queue::empty and std::array:empty:
They were both twice in the same function name list.
std::string::size, std::wstring::size:
They were already configured with many other size functions above.
std::basic_string::size:
This entry was twice in the same function name list directly one after
another. Very likely one of them should be the length function, which
does simply the same but was missing in the std.cfg.
2018-01-24 15:31:55 +01:00
Sebastian 4dbeffd615 std.cfg: Fix redundant function names (#1050)
This fixes some more redundant function configurations. Seems like they
are the result of copy & paste errors.
2018-01-22 17:18:36 +01:00
Sebastian 6bd524baaf std.cfg: Fix copy&paste error or typo (#1033)
* Fixed copy&paste error or typo

It should be std::sinf here. std::sinl is described directly in the next function description and does not make sense here because of the return type.

* std.cfg: Fix another copy&paste error or typo

It should be std::tanf here.
2018-01-16 08:36:04 +01:00
orbitcowboy a01c6c95eb std.cfg: Added missing non-namespace configuration for stoi()-like functions. 2017-12-15 21:42:39 +01:00
orbitcowboy b14146b853 std.cfg: Improved configuration of wcsncpy. 2017-12-08 21:21:26 +01:00
orbitcowboy 77c43f2d24 #8293: Applied fix from versat. 2017-12-08 09:33:54 +01:00
Daniel Marjamäki 1e870762a3 std.cfg: open/save with GUI 2017-11-12 15:17:58 +01:00
Daniel Marjamäki 1699775c3c std.cfg: Save from GUI 2017-11-12 15:11:37 +01:00
orbitcowboy 589ce19822 Added support for std::ios::clear. 2017-10-18 14:16:36 +02:00
orbitcowboy 51eb4ffe9b std.cfg: Added support for std::string::reserve(). 2017-10-15 11:22:42 +02:00
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