Commit Graph

163 Commits

Author SHA1 Message Date
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
Sebastian fc7aab220e
posix.cfg: Add some pthread_attr_* functions. (#1331)
References:
http://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_attr_setstacksize.html
http://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_attr_setguardsize.html
2018-08-08 12:22:09 +02:00
Sebastian f862cf603f
posix.cfg: Add some pthread_mutex_* functions. (#1320)
References:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_init.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_lock.html
2018-07-21 17:52:12 +02:00
Sebastian 4ef452132c
posix.cfg,gnu.cfg: Add (get|set)hostname functions. (#1315)
Reference for POSIX gethostname:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html
Reference for sethostname:
http://man7.org/linux/man-pages/man2/gethostname.2.html
2018-07-18 09:40:06 +02:00
orbitcowboy 335cb480bf posix.cfg: Added support for locale_t 2018-06-08 14:43:20 +02:00
Sebastian 50aa3620da
posix.cfg: Add minsize to readlink[at] function configurations (#1216) 2018-05-09 18:20:45 +02:00
Sebastian 90bc8b7404
posix.cfg: Add not-bool to last arguments where appropriate. (#1204)
Add not-bool function argument configuration where appropriate to catch errors like this: df4ca5fb72
2018-05-08 09:30:08 +02:00
amai2012 e8cccf842f Correct attributes for swab() 2018-03-20 11:40:50 +01:00
Daniel Marjamäki 7048f012a8 astyle formatting
[ci skip]
2018-03-19 20:33:36 +01:00
Daniel Marjamäki 7202787435 posix: remove function 'remove' that is also configured in std.cfg 2018-03-19 20:04:58 +01:00
Daniel Marjamäki 6b00ca33bd posix.cfg: Removed rename function as this is configured in std.cfg 2018-03-19 15:29:47 +01:00
amai2012 113f1efd72 Add configuration for swab() and sync() 2018-03-19 13:12:16 +01:00
Daniel Marjamäki 6e66150feb posix.cfg: update configuration for rename 2018-03-19 11:51:19 +01:00
Sebastian 7b02b45a76 posix library: Add strtok tests (#1069)
* posix library: Add strtok tests

In the posix library there is the same configuration for strtok but a
warning is added.

* posix.cfg: Remove redundant configuration for strtok, add comment.
2018-01-31 10:58:30 +01:00
Sebastian a4deca3c98 posix.cfg: Remove redundant entries (#1049)
I carefully removed the duplicate/redundant entries with less/missing
configuration, so no information is lost.
2018-01-22 17:21:07 +01:00
Sebastian b78d714037 posix.cfg: access(): Removed redundant configuration, added tests (#1048)
I intentionally removed the second access() configuraion because it was
missing the use-retval attribute. But calling access() without using the
return value is absolutely senseless.
I added tests to posix.c to verify the correct configuration of
access().
2018-01-22 14:54:14 +01:00
Sebastian de7aa8f513 Fix #7504: posix: open() was twice in configuration file (#1032)
* Fix #7504: posix: open() was twice in configuration file

This fixes ticket #7504: Problems with the open function were not always
detected because the open function was twice in posix.cfg and only the
second configuration was used by cppcheck. Like suggested now only
one configuration is used and the third parameter has a default value
and is thereby optional.
use-retval has been removed to avoid duplicate warnings because the
alloc/dealloc configuration already warns about unused retval.
According tests to verify that open is configured
correctly now have been added to test/cfg/posix.c.

* posix.cfg: open(): Add TODO for use-retval configuration
2018-01-18 13:56:36 +01:00
Sebastian 2e2f8a00d6 posix.cfg: Fix getprotobynumber configuration (#1034)
It seems to be a copy & paste error.
The comment, the return value, the warn entry and the rest of the
configuration suggest that this must be the getprotobynumber function
configuration and not the getservbyport configuration which would be
redundant as it is configured a bit later.
2018-01-16 10:46:30 +01:00
orbitcowboy d63897ff21 posix.cfg: Added support for stpncpy(). 2017-12-08 21:36:54 +01:00
orbitcowboy cdeb7fb25f posix.cfg: Added support for wcpncpy. 2017-12-08 21:28:48 +01:00
orbitcowboy 928727534a posix.cfg: Improved configuration for bcopy(): Warn for potential buffer access out of bounds issues. 2017-12-08 14:53:14 +01:00
orbitcowboy 1a4c25243c posix.cfg: Added more returnValue-types. 2017-10-05 11:38:11 +02:00
orbitcowboy c0f92b2409 posix.cfg: Added support for tcsendbreak. 2017-09-19 21:25:19 +02:00
orbitcowboy c4e2ca2996 posix.cfg: Added support of ioctl. 2017-09-19 21:12:03 +02:00
orbitcowboy 6d69845737 posix.cfg: Added support for some <termios.h>-functions. 2017-09-19 15:10:37 +02:00
orbitcowboy 40985ada14 posix.cfg: Added more returnValue-types. 2017-08-02 14:11:50 +02:00
orbitcowboy 4024420a4d posix.cfg: Added more returnValue-types and increased function support. 2017-08-02 09:26:16 +02:00
orbitcowboy d2698733c3 posix.cfg: Added returnValue-types for some functions. 2017-08-01 20:35:30 +02:00
orbitcowboy 39ca654519 posix.cfg: Fixed wrong index. The memory is allocated at the 4'th parameter. 2017-07-17 15:21:42 +02:00
orbitcowboy c62e46dc6e posix.cfg: Report memory leak when memory is allocated with getaddrinfo() and it is not freeded with freeaddrinfo(). 2017-07-17 15:17:20 +02:00
Alexander Mai 7a0f05aaa5 Correct some wrong attributes causing false positives. Add more interfaces 2017-06-08 22:33:41 +02:00
Alexander Mai d818b4ace1 Add more interfaces 2017-06-06 23:21:05 +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
Alexander Mai 14be611a7e Correct configuration to allow NULL as 2nd argument to read/write. Whether it's a legal value depends on the 3rd argument 2017-04-29 17:57:16 +02:00
orbitcowboy 0b6c726439 posix.cfg: Do not allow the second parameter of read and write to be a NULL pointer. 2017-04-26 14:25:14 +02:00
amai2012 1d0b647072 #7915 false positive: "Memory leak" error after mmap return MAP_FAILED. define MAP_FAILED in posix.cfg. 2017-02-07 12:14:55 +01:00
alexander d846217641 #7906 false positive: (error) Null pointer dereference (tempnam) 2017-01-29 17:09:48 +01:00
orbitcowboy 6829a8da14 posix.cfg and windows.cfg: Added support for memccpy(). 2016-12-05 16:46:49 +01:00
orbitcowboy 7522b1b108 posix.cfg: Improved configuration by using <valid>-tags. 2016-12-05 10:30:11 +01:00
Daniel Marjamäki a5e214ab3f astyle formatting
[ci skip]
2016-12-04 19:15:32 +01:00
amai2012 abf59af87d Add a couple of interfaces 2016-12-04 12:24:26 +01:00
orbitcowboy 7b1ed9f415 windows.cfg and posix.cfg: Added more <use-retval/> configurations. 2016-11-28 16:58:33 +01:00
orbitcowboy 4130207edc posix.cfg and windows.cfg: Added support for more functions like _popen(). 2016-10-21 11:43:01 +02:00
orbitcowboy a7e8bcab62 posix.cfg: Improved support for getpwuid_r(). 2016-10-21 09:59:38 +02:00
orbitcowboy 466068f55d posix.cfg: added/updated getpwnam_r(), getgrent_r() and getpwuid_r(). 2016-10-18 17:01:05 +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
Boris Egorov a0624344ce posix.cfg: Add more functions and comments 2016-08-04 21:07:26 +02:00
orbitcowboy e76518d800 posix.cfg: Added support for fnmatch. 2016-05-24 16:17:09 +02:00
orbitcowboy fd8fb9e4f4 cfg: Fixed FP recently introduced for fopen_s() and glob(). 2016-05-19 13:21:05 +02:00