orbitcowboy
da29a1f56b
gnu/bsd.cfg: Cleanup redundant configuration for timercmp() and add more tests.
2019-09-10 11:51:47 +02:00
versat
7737a448cf
Fix #9345 FP wrongPrintfScanfArgNum for vasprintf
...
Configuration "<formatstr/>" for function is wrong, for the argument it
is fine.
2019-09-09 15:02:55 +02:00
orbitcowboy
aed5e17867
#9323 , #9331 : Moved configuration and tests to gnu and bsd.
2019-09-08 19:17:15 +02:00
versat
7ee36489f1
gnu.cfg: Add configuration for __builtin_memcpy()
...
In case there is something like `#define memcpy __builtin_memcpy` in the
code our define for __builtin_memcpy does not work.
So the configuration for __builtin_memcpy is added as a fallback.
2019-08-02 13:17:39 +02:00
versat
2519a1aed5
gnu.cfg: Add more __builtin_* functions and some tests
...
Most of them were detected by daca@home
2019-08-02 12:27:46 +02:00
Sebastian
5390588cda
gnu.cfg: Add xfree() ( #2051 )
...
It is hard to find good references, one that describes it a bit can
be found here:
https://manpages.ubuntu.com/manpages/bionic/man3/xmalloc.3pub.html
xfree() can be used instead of free().
A check, to verify that a memory leak is found if the memory allocated
via xmalloc() is not freed, has also been added.
2019-08-02 07:41:32 +02:00
Rikard Falkeborn
e19068504d
Configure xrealloc and adjust gnu memory functions ( #2003 )
...
Remove <noreturn> tag, since the functions do not return unless there
was no error.
2019-07-16 08:12:21 +02:00
orbitcowboy
9a41b51a04
gnu.cfg: Added support for isascii_l(), which is a GNU-extension.
2019-05-31 11:24:41 +02:00
Daniel Marjamäki
e80181d35a
astyle formatting
...
[ci skip]
2019-05-17 09:32:14 +02:00
orbitcowboy
0469111750
gnu.cfg: Improved configuration for mkostemp(), mkstemps() and mkostemps().
2019-05-16 16:02:05 +02:00
orbitcowboy
92be62a6eb
gnu.cfg: Ensure the return value of pipe2() is taken into account.
2019-05-03 22:15:46 +02:00
orbitcowboy
d724f86e01
gnu.cfg: Added support for tee(). Reference: http://man7.org/linux/man-pages/man2/tee.2.html
2019-04-26 17:55:47 +02:00
orbitcowboy
2dd42b867f
gnu.cfg: Added support for dup3(). Reference: http://man7.org/linux/man-pages/man2/dup2.2.html
2019-04-26 16:57:43 +02:00
orbitcowboy
c693e8969d
gnu.cfg: Added support for more interfaces.
2019-04-26 16:39:04 +02:00
orbitcowboy
c0b533c452
gnu.cfg: Warn for socket/file-descriptors having negatives values.
2019-04-25 17:07:44 +02:00
amai2012
9692c3dde7
Add macros from signal.h
2019-04-25 12:17:26 +02:00
versat
e0e262ae25
gnu.cfg: Use function configuration for `_()` instead of define.
...
There can be preprocessor issues if the macro is used slightly different
or preprocessor conditions are used inside the string argument.
So now a function configuration with very few assumptions is used.
It is assumed that the function does return and has one parameter.
The same configuration is added for N_() since it works similar.
2019-04-03 16:02:55 +02:00
versat
5134fefb52
gnu.cfg: Add support for bswap*() macros.
2019-04-01 14:25:59 +02:00
orbitcowboy
e98ddb6cc5
gnu.cfg: Added support for pipe2().
2019-03-30 15:50:18 +01:00
versat
7c09b0cfe0
gnu.cfg: Add "buffer-size" attribute and tests for xcalloc().
2019-03-21 10:44:18 +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
versat
9b6b94336c
gnu.cfg: Add buffer-size to xmalloc; add some __builtin_*() functions.
2019-03-19 15:24:02 +01:00
versat
bb7888e70b
gnu.cfg: Add support for pvalloc() and __builtin_alloca().
2019-03-18 11:44:35 +01:00
versat
3d02c10fde
gnu.cfg: Further fixes, enhancements and adding argument directions.
2019-03-14 09:26:27 +01:00
versat
d5c5feafb2
gnu.cfg: Fixes, enhancements and adding argument directions.
2019-03-13 16:17:16 +01:00
Sebastian
1fe1fc7008
gnu.cfg: Add support for non-GNU _(string) macro. ( #1726 )
...
As can be read here:
https://www.gnu.org/software/gettext//manual/html_node/Mark-Keywords.html
The _(str) macro is typically defined for a project to abbreviate the
gettext(str) call. Although this is not part of GNU it would enhance the
analysis. Cppcheck often does not know what _() is. In daca@home it is
reported thousands of times as a function without configuration.
2019-03-06 10:57:59 +01:00
orbitcowboy
fa59cb91cb
gnu.cfg: Added <use-retval/> to xrealloc() configuration.
2019-02-28 23:45:51 +01:00
orbitcowboy
b222ff14be
gnu.cfg: Added support fo xexit().
2019-02-28 22:55:17 +01:00
orbitcowboy
80e31755da
gnu.cfg: Added support for xrealloc().
2019-02-28 22:48:39 +01:00
orbitcowboy
43daaca19c
gnu.cfg: Added support for xstrdup().
2019-02-28 22:46:16 +01:00
orbitcowboy
e6d36913c8
gnu.cfg: Added support for xmalloc() and xcalloc(). Reference: https://gcc.gnu.org/onlinedocs/libiberty/Functions.html
2019-02-28 22:36:52 +01:00
Martin Ettl
17c1733b0e
gnu.cfg: Added support for asprintf() and vasprintf(). There is a FN with memory leak detection regarding pointer args, which is already mentioned in #8980 . A comment has been added.
2019-02-27 15:17:34 +01:00
amai2012
22611c4b74
Add getopt_long,getopt_long_only to gnu.cfg
2019-02-05 21:29:56 +01:00
amai2012
d6d8a871ca
Add/correct some interfaces. Move some standard interfaces from gnu.cfg to posix.cfg.
2019-01-28 23:26:53 +01:00
Sebastian
5c91d7b4e1
gnu.cfg: Add support for gettext() and some related functions ( #1621 )
...
* gnu.cfg: Add support for gettext() and some related functions
Reference (beside some other web sites):
https://www.gnu.org/software/libc/manual/html_node/Translation-with-gettext.html
2019-01-24 23:08:42 +01:00
orbitcowboy
ba28cbe0ff
gnu.cfg: Replaced '__builtin_memset' definition with macro definition, since it is equal to 'memset' from std.cfg.
2018-10-30 15:37:20 +01:00
orbitcowboy
b998dcb5aa
gnu.cfg: Added support for '__builtin_memset'.
2018-10-27 18:25:05 +02:00
orbitcowboy
879803c90f
gnu.cfg: Fixed FP (nullpointer) when third parameter of epoll_ctl is set to NULL.
2018-09-25 09:07:49 +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
Sebastian
b5b84d1737
gnu.cfg Remove redundant function and resource configurations ( #1036 )
...
The epoll_* function and resource configurations somehow where added
twice.
This removes all duplicates (they have the same
attributes/configuration).
2018-01-16 17:13:15 +01:00
orbitcowboy
cbc95c5662
gnu.cfg: Added more returnValue-types.
2017-10-05 11:45:46 +02:00
orbitcowboy
cc210679a5
gnu.cfg: Added returnValue-types.
2017-08-02 14:34:06 +02:00
Daniel Marjamäki
7875054f36
Fixed #8078 (cppcheck-cfg.rng outdated)
2017-07-23 12:09:41 +02:00
Alexander Mai
389b4cdf99
Remove atrribute to cure FP. Run astyle
2017-05-29 20:04:34 +02:00
alexander
49a28d00f9
Add some interfaces + small changes to existing ones
2017-05-29 00:47:24 +02:00
orbitcowboy
26f0ee6703
windows.cfg and gnu.cfg: Improved support for strtok-functions.
2017-02-22 10:27:05 +01:00
orbitcowboy
e8aede649a
gnu.cfg: Improved configuration by using <valid>-tags.
2016-12-05 10:37:13 +01:00
orbitcowboy
29a6a39fb5
gnu.cfg: Improved configuration of memmem().
2016-12-04 20:30:33 +01:00
orbitcowboy
8ea36fb6ec
gnu.cfg,posix.cfg: Added support for more functions.
2016-01-22 10:40:04 +01:00
orbitcowboy
b65873711a
posix.cfg,gnu.cfg: Moved a few functions from posix to gnu. Improved the documentation.
2016-01-21 16:32:00 +01:00