Commit Graph

88 Commits

Author SHA1 Message Date
orbitcowboy e293b66ac6 gnu.cfg: Added support for getservent_r(). 2022-05-03 11:54:28 +02:00
orbitcowboy 28da263d8b gnu.cfg: Added support for qsort_r(). 2022-05-02 12:06:45 +02:00
orbitcowboy 6ad5a94acf gnu.cfg: Improved configuration for memrchr(). 2022-05-01 18:10:19 +02:00
orbitcowboy e0ccfea027 gnu.cfg: Improved configuration of ffsl() and ffsll() 2022-05-01 15:29:35 +02:00
orbitcowboy 85f44d36dd gnu.cfg: Added support for semtimedop(). 2022-05-01 11:41:51 +02:00
orbitcowboy 0000bb2792 gnu.cfg: Added support for mempcpy() and wmempcpy(). Ref.: https://man7.org/linux/man-pages/man3/mempcpy.3.html 2022-04-05 11:09:58 +02:00
orbitcowboy d376201cb4 gnu.cfg: Added support for getpw(). Ref.: https://man7.org/linux/man-pages/man3/getpw.3.html 2022-03-23 17:14:26 +01:00
orbitcowboy cb6f234a92 gnu.cfg: Added support for secure_getenv() 2022-03-22 09:32:34 +01:00
orbitcowboy b2b214991d gnu.cfg: Added overlapping data check to __builtin_memcpy() 2021-07-18 10:08:32 +02:00
keinflue f47fd20e14
Add test cases and improvements for PR #3240. (#3242) 2021-05-03 10:45:37 +02:00
Daniel Marjamäki 1bce1cf83c astyle formatting
[ci skip]
2021-05-02 21:36:24 +02:00
keinflue d553df75c6
Fix FP unknownEvaluationOrder on __builtin_bswap*. (#3240) 2021-05-02 08:48:43 +02:00
orbitcowboy cd4cc30cb3 gnu.cfg: Added support for more interface, found by daca@home 2020-12-25 12:25:53 +01:00
Oliver Stöneberg b091eaccbe
gnu.cfg: added *_FILENO defines (#2972) 2020-12-24 19:49:50 +01:00
Gabor Marton 9960d2ee29
[posix.cfg] Fix fstat family (#2629)
* [posix.cfg] Fix fstat family
* Move fstatat64 and __fxstatat64 to gnu.cfg
2020-05-08 09:16:59 +02:00
Sebastian 02c0240dcd
Fix #9322: bsd.cfg, gnu.cfg: Fix FP for mmap when argument "fd" is -1 (#2306)
In contrast to POSIX, GNU and BSD allow or even require the argument
"fd" to be set to -1 if MAP_ANONYMOUS or MAP_ANON is specified.
2019-10-30 09:39:50 +01:00
Sebastian 60de5e12dd gnu.cfg: Add configuration for __alignof__() (#2268)
Reference: https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Alignment.html
2019-10-14 20:59:38 +02:00
Sebastian 0527b80174
gnu.cfg: Add support for __glibc_likely() and __glibc_unlikely() (#2267)
Reference:
https://sourceware.org/glibc/wiki/Style_and_Conventions#Branch_Prediction
2019-10-14 12:16:28 +02:00
Sebastian 267d23f1b8
gnu.cfg: Define `__typeof__` as `typeof`, fix simplifyTypedef() (#2260)
`__typeof__` is just an alternative keyword for `typeof`, see
https://gcc.gnu.org/onlinedocs/gcc/Typeof.html
Since `typeof` is handled in several checkers it makes sense to define
`__typeof__` as `typeof`.
Tokenizer::simplifyTypedef(): Use `typeof` instead of `__typeof__` to
be consistent with the rest of the code.
2019-10-14 08:20:22 +02:00
versat 77c711d129 gnu.cfg: Add configuration and test for __builtin_assume_aligned() 2019-10-10 10:23:21 +02:00
versat 7277fe5a2b gnu.cfg: Add support for macro __extension__
The macro does nothing except preventing from warnings when compiling
with "pedantic" or other options.
2019-09-19 12:27:21 +02:00
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