Commit Graph

43 Commits

Author SHA1 Message Date
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
Sebastian 50aa3620da
posix.cfg: Add minsize to readlink[at] function configurations (#1216) 2018-05-09 18:20:45 +02:00
amai2012 1c38b3aae7 Fix warning in test on Cygwin 2018-02-22 12:27:46 +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
orbitcowboy f5e6ef9fd2
checkio: Fixed potential usage of invalid iterator. (#1066)
* checkio: Fixed potential usage of invalid iterator.

* formatted the code.

A ticket about FN (invalidIterator1) is created at https://trac.cppcheck.net/ticket/8373
2018-01-30 08:43:15 +01:00
Sebastian e8a262a1f2
posix.cfg: Enable/Add fdopen tests (#1063)
* posix.cfg: Enable/Add fdopen tests

* posix.cfg: Add missing empty line
2018-01-29 11:19:31 +01:00
Daniel Marjamäki ce44a5805c astyle formatting
[ci skip]
2018-01-23 18:15:37 +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
Daniel Marjamäki 0a70b8794c astyle formatting
[ci skip]
2018-01-19 23:26:28 +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
Daniel Marjamäki 58034dee86 Fixed #8076 (unmatched suppression when calling ./runtests.sh (test/cfg)) 2018-01-10 15:52:06 +01: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
Daniel Marjamäki 4175902e36 astyle formatting
[ci skip]
2017-04-26 18:42:34 +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
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
Daniel Marjamäki e8182395f7 Fix 'make checkcfg' by adding inline suppressions when obsolete functions are used. 2015-11-22 17:52:47 +01:00
orbitcowboy bf53065d17 Added a comment, no functional changes [ci-skip]. 2015-09-10 13:23:34 +02:00
orbitcowboy 66b9d8bf38 Improved testing of std.cfg and posix.cfg. 2015-09-10 11:50:47 +02:00
orbitcowboy 2f5fd66d00 #6577: Added test cases to test/posix.c. They demonstrate that there is still a false negative. 2015-09-09 08:53:12 +02:00
Martin Ettl 77869b7812 test/cfg: Improved testing of functions from standard namespace. Added test/cfg/*.c* files to astyle script and formatted code. 2015-08-14 01:36:44 +02:00
Alexander Mai bacc5ac1cc Fix false positives ignoredReturnValue about some posix interfaces. Remove redundant strsignal() output from signal handler 2015-04-06 18:16:37 +02:00
Alexander Mai cb6ed95ed3 posix.cfg: add more interfaces. Remove include from test which is missing on travis 2015-03-15 13:28:16 +01:00
Alexander Mai 3a690fd18e posix.cfg: fix false positive and add more interfaces 2015-03-15 12:56:24 +01:00
Alexander Mai 5b8d93efda posix.cfg: Fix false positives and add poll() 2015-03-14 23:31:56 +01:00
Daniel Marjamäki 0efa113b6e fixed test/cfg/posix.c code 2015-03-14 19:40:13 +01:00
Alexander Mai d52e3c8eb7 Fix missing suppression in test/cfg/posix.c 2015-03-13 18:29:46 +01:00
Alexander Mai 6bd7dd771d Add some functions from <time.h> to posix.cfg (see #6577) 2015-03-11 18:59:34 +01:00
Martin Ettl 0839ce5a96 posix.cfg: Removed duplicate utime() function introduced by 841a27c19d. Added more test cases for uninitvar for utime() and utimes(). 2015-03-08 21:38:43 +01:00
amai2012 3d9c2b4d97 Merge pull request #542 from MegaManSec/master
Add utime function to posix.cfg
2015-03-08 19:55:41 +01:00
Alexander Mai 34a61e0883 Additions to windows.cfg. Fix compiler warning in test/cfg/posix.c 2015-03-08 15:21:50 +01:00
Joshua Rogers 841a27c19d Add utime function to posix.cfg 2015-03-09 00:43:25 +11:00
Alexander Mai 49099e78ff Add more string conversion functions to library files 2015-03-01 20:18:26 +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
Alexander Mai 6bfeb71dd2 Add more interfaces to gnu and posix libraries 2015-02-21 11:08:58 +01:00
Alexander Mai 6d9eb6199d posix.cfg: add support for sched.h and 1 bugfix 2015-02-20 20:50:20 +01:00
Daniel Marjamäki fd4d4bba33 test/cfg/posix.c: fix tests 2015-02-17 19:58:07 +01:00
Daniel Marjamäki 6363c1359d TestUninitVar: moved out posix.cfg testing 2015-02-17 18:16:29 +01:00
Daniel Marjamäki e5c098c7de TestUninitVar: move out posix.cfg testing 2015-02-17 18:08:19 +01:00
Alexander Mai 0a6babea74 #6181 Drop redundantGetAndSetUserId. Ensure (style-) warnings are issued if setuid()/getuid() and some related functions are ignored. Move strdupa()/strndupa() from posix.cfg to gnu.cfg 2015-02-16 22:19:51 +01:00
Daniel Marjamäki d83f07dddd TestOther: moved posix.cfg testing 2015-02-16 16:25:27 +01:00
Daniel Marjamäki fe8ba51f03 TestMemLeak: moved posix.cfg tests 2015-02-15 18:11:09 +01:00
Daniel Marjamäki d9deabe2ce TestBufferOverrun: clean up 2015-02-10 17:29:36 +01:00
Daniel Marjamäki 355a2d38b3 added missing test/cfg/posix.c file 2015-01-30 07:52:32 +01:00