chrchr-github
966dbb1990
Windows.cfg: add UNREFERENCED_PARAMETER() macro ( #3809 )
2022-02-08 11:50:28 +01:00
orbitcowboy
c983151b9c
posix.cfg: Added support for lseek64().
2022-02-07 14:15:48 +01:00
orbitcowboy
bd1d8ea7b8
posix.cfg: Improved configuration of lseek().
2022-02-07 13:58:38 +01:00
orbitcowboy
2dea968ec5
windows.cfg: Improved configuration of _fseeki64()
2022-02-07 09:12:31 +01:00
orbitcowboy
a7b7b46d76
posix.cfg: Improved configuration of fseeko()/fseeko64().
2022-02-07 09:03:39 +01:00
orbitcowboy
2f17147900
std.cfg: Improved configuration for fseek(). The 3rd argument is not allowed to be of Boolean type.
2022-02-07 09:02:24 +01:00
orbitcowboy
fa776051e9
Fixed Ticket 1001 - std.cfg: Invalid parameters for fseek()
2022-02-06 16:05:14 +01:00
orbitcowboy
31ea13eb0c
test std.cfg: Fixed wrong npos constant.
2022-02-04 12:39:43 +01:00
orbitcowboy
7062b0a973
std.cfg: Improved configuration of std::[w]string::substr(). Do not allow negative length arguments.
2022-02-04 12:30:37 +01:00
Daniel Marjamäki
9f6a36c1a8
Revert "Fix #10671 : functionConst FN with begin/end and const_iterator ( #3749 )"
...
This reverts commit 2cacb13f85
.
2022-02-03 11:04:02 +01:00
Rikard Falkeborn
2cacb13f85
Fix #10671 : functionConst FN with begin/end and const_iterator ( #3749 )
...
Check if the iterator is assigned to a const_iterator or
const_revese_iterator, in which case it is possible the function can be
const. Unfortunately, it is not possible to remove the hard coding of
cbegin, cend, crbegin and crend due to the need to handle auto, as in
the following code snippet:
void cbegin_auto(void)
{
for (auto it = m_str.cbegin(); it != m_str.cend(); ++it) {;}
}
2022-02-02 19:37:06 +01:00
chrchr-github
dad64bfcc8
Fix #10091 FP shadowFunction with default destructor implementation / Tests for #8635 , #9776 , #9940 , #9951 , #10018 ( #3763 )
2022-02-02 19:30:49 +01:00
orbitcowboy
00997283cb
Code formatting
2022-01-25 13:08:05 +01:00
chrchr-github
cb5a50c6a7
Fix #10710 FN passedByValue with QString ( #3696 )
2022-01-18 20:17:05 +01:00
Paul Fultz II
abb0563cef
Fix 10726: Crash in CheckExceptionSafety::checkRethrowCopy ( #3711 )
2022-01-16 12:35:51 +01:00
Maurice Gilden
44b182c9a7
Improve definitions for googletest ASSERT_* macros ( #3694 )
...
This avoids assertWithSideEffect and follows more closely what the real macros
are doing, similar to the ones in boost.cfg and cppunit.cfg.
2022-01-12 22:09:17 +01:00
chrchr-github
e4c8798974
Fix #10556 FP containerOutOfBounds with QList [inconclusive] ( #3688 )
2022-01-12 22:03:57 +01:00
chrchr-github
df3da38483
Fix #10682 Unused QString / #10686 unused std::array / #10005 unused variable with c++11 braced initializer not detected ( #3684 )
2022-01-10 07:36:49 +01:00
Armin Müller
d5daba331f
Typos found by running "codespell" ( #3659 )
2022-01-02 08:12:08 +01:00
orbitcowboy
21abf315b3
windows.cfg: Added a regression test for GetPrivateProfileString() as we had a FP in the past 8b6c14aa48
2021-10-17 11:05:19 +02:00
Daniel Marjamäki
08bc21199e
Make ci happy
2021-10-03 22:01:13 +02:00
Daniel Marjamäki
b3f9df968b
Uninitvar: fixed 'make checkcfg'
2021-10-03 20:32:39 +02:00
orbitcowboy
944c9f0db9
Formatted the code [ci skip]
2021-09-20 11:39:04 +02:00
orbitcowboy
578d3c3a93
Fixed #8723 : False negative: Same expression with methods
2021-09-17 19:46:46 +02:00
Paul Fultz II
d30f42e0da
Fix FP when calling a function in a condition ( #3412 )
2021-08-21 18:52:11 +02:00
orbitcowboy
46f7275833
#8113 : Added a regression test.
2021-08-09 18:30:29 +02:00
Paul Fultz II
7f358b2bed
Format with uncrustify ( #3388 )
2021-08-07 20:51:18 +02:00
orbitcowboy
8096fa4db1
std.cfg: Added overlappingWriteFunction-check to wcsncat().
2021-07-16 14:30:49 +02:00
orbitcowboy
9b46f59ff0
std.cfg: Cleanup wrong test case.
2021-07-16 14:25:04 +02:00
orbitcowboy
e90a3053d4
std.cfg: Added a overlappingWriteFunction-check to strncat
2021-07-16 14:01:40 +02:00
orbitcowboy
435cffa858
std.cfg: Improved configuration of std::next(),std::prev() and added TODO tests
2021-07-14 10:12:49 +02:00
orbitcowboy
01b68b99c6
posix.cfg: Added overlapping data check for stpcpy().
2021-07-11 16:42:19 +02:00
orbitcowboy
d782cd629a
posix.cfg: Added overlapping data check for bcopy().
2021-07-11 16:38:25 +02:00
orbitcowboy
10fb1851c5
Added more overlapping data configurations
2021-07-10 18:41:36 +02:00
orbitcowboy
7ad64891ea
Added tests for overlapping data.
2021-07-10 18:28:26 +02:00
orbitcowboy
b68c5dee07
windows.cfg: Added support for _mbscpy().
2021-07-10 09:27:22 +02:00
orbitcowboy
c38a43c353
std.cfg: Added overlappingWriteFunction check to wcscpy().
2021-07-10 09:20:51 +02:00
orbitcowboy
652e2765bc
std.cfg: Added support for wcsncpy regarding data-overlapping
2021-07-09 16:32:54 +02:00
Daniel Marjamäki
86f1acc223
overlapping data; use the size value given by size-arg
2021-07-09 13:43:29 +02:00
orbitcowboy
58811808d5
std.cfg: Improved configuration of 'strncpy', which is vulnerable for overlapping write issues.
2021-07-09 09:48:24 +02:00
orbitcowboy
f626035963
std.cfg: Added support for more interfaces
2021-06-03 08:07:53 +02:00
orbitcowboy
39912b5096
std.cfg: Added support for more interfaces
2021-06-03 07:55:26 +02:00
orbitcowboy
4c81a59c0b
std.cfg: Added support for more interfaces
2021-06-03 07:33:23 +02:00
Daniel Marjamäki
22ae4543a6
Fixed 'make checkcfg'
2021-05-22 07:39:27 +02:00
Daniel Marjamäki
224492b0b5
Uninitalialized variables; Avoid FP for void cast
2021-05-17 05:59:28 +02:00
keinflue
e93f8f140e
Regression tests for PR #3258 ( #3259 )
2021-05-17 05:35:16 +02:00
Daniel Marjamäki
6a0a2456b5
make checkcfg; temporarily disable suppressions
2021-05-16 22:48:22 +02:00
Daniel Marjamäki
105bb78775
CI; fix test/cfg/openmp.c
2021-05-14 22:16:54 +02:00
Daniel Marjamäki
45eb9f82a0
Fix CI; Cppcheck find some more unusedAllocatedMemory violations in test/cfg/..
2021-05-13 23:08:58 +02:00
Daniel Marjamäki
7fefdf2bf7
astyle formatting
2021-05-03 16:34:55 +02:00
keinflue
f47fd20e14
Add test cases and improvements for PR #3240 . ( #3242 )
2021-05-03 10:45:37 +02:00
keinflue
6b8029633f
Fix build warnings and checkcfg errors with musl and libc++. ( #3244 )
...
* Fix musl include warning.
* Fix test/cfg errors with musl/libc++.
* Use correct C++ include for PR #3244
Co-authored-by: keinflue <>
2021-05-03 09:39:33 +02:00
Paul Fultz II
563c9dd9cc
Fix issue 10208: FP: knownConditionTrueFalse in for loop with function that assigns by ref ( #3198 )
2021-04-18 21:42:27 +02:00
orbitcowboy
f62d9d5853
std.cfg: Fixed bufferAccessOutOfBounds false negative for strncmp().
2021-04-13 19:13:00 +02:00
orbitcowboy
03bdcc4c42
Attempt to make CI happy
2021-04-13 16:57:31 +02:00
orbitcowboy
44c8b315c6
Attempt to make CI happy
2021-04-13 14:44:59 +02:00
orbitcowboy
040e58f943
std.cfg: strxfrm(): Added minize values to arg1 and arg2 and a TODO test case
2021-04-13 14:07:45 +02:00
orbitcowboy
cf211610d3
wxwidgets.cfg: Fixed wrong configuration for wxLogApiError(). This function does return after appending data to wxLog(). Ensure that no duplicateBreak-warning is issued in case code resides afterwards.
2021-04-13 13:07:15 +02:00
orbitcowboy
e60d79e2c9
wxwidgets.cfg: Added tests for commit ccb2cb26b2
2021-04-07 07:57:27 +02:00
Daniel Marjamäki
de2e836727
test/cfg/windows.cpp; Uncommented TODO, Cppcheck now writes a warning as it should about unused function return value
2021-04-05 05:20:42 +02:00
Daniel Marjamäki
9ce0235e8e
std.cfg: Fixed configuration of mbstowcs
2021-04-03 10:42:24 +02:00
Daniel Marjamäki
99ff242dde
astyle formatting
...
[ci skip]
2021-02-20 13:33:57 +01:00
Lukasz Czajczyk
0a06a083af
Additional macros ( #3106 )
2021-02-20 13:19:06 +01:00
Oliver Stöneberg
95d1b41a5b
runtests.sh: fixed check for cppunit ( #3072 )
2021-01-21 10:59:34 +01:00
Oliver Stöneberg
f46a9e3543
fixed/excluded some shellcheck warnings and actually fail the build when something is found ( #3068 )
2021-01-20 18:43:49 +01:00
Rikard Falkeborn
f816cc8d48
runtests: Add -Wno-deprecated-declarations to CXX flags ( #3004 )
...
This avoids warnings when checking syntax of qt.cpp.
2021-01-02 10:02:16 +01:00
orbitcowboy
2c15c384d1
Fixed some typos, there are no functional changes intended
2020-12-05 08:00:31 +01:00
Rikard Falkeborn
a7f6621fc0
cfg: cppunit: Fix FP with compareBoolExpressionWithInt within CPPUNIT_ASSERT_EQUAL ( #2879 )
2020-11-04 07:48:53 +01:00
Daniel Marjamäki
eece8ee66b
astyle formatting
2020-11-03 21:08:21 +01:00
Oliver Stöneberg
98946143f6
Fix #9964 (false positive: compareBoolExpressionWithInt with ASSERT_FALSE() and --library=googletest) ( #2876 )
2020-11-03 10:20:25 +01:00
Rikard Falkeborn
de19dc9e3e
Fix #8327 (Memleak with mmap return value check) ( #2864 )
...
Also fix a broken test case related to checking the return value -1
where socket was not defined in the library used in the tests.
This was tested running test-my-pr with 500 packages. The difference was
six fewer FPs.
2020-10-29 13:17:33 +01:00
orbitcowboy
da6f10e369
Astyle formatting code [ci skip]
2020-10-01 08:33:16 +02:00
Daniel Marjamäki
1548bf2267
Fix googletest.cfg macros ASSERT_THROW and EXPECT_THROW to avoid syntax errors
2020-09-30 18:45:04 +02:00
orbitcowboy
63917bc3c3
Better fix for c4dd8536c1
2020-09-30 15:44:06 +02:00
Daniel Marjamäki
c4dd8536c1
Fixed make checkcfg
2020-09-30 12:36:31 +02:00
Paul Fultz II
32df807b22
Fix issue 9783: wrong lifetime analysis temporary assigned to object ( #2711 )
2020-09-02 07:13:15 +02:00
Paul
fec2914700
Add tests for container changes
2020-08-09 22:52:03 -05:00
Paul
26693df788
Use forward analyzer for container forward
2020-08-08 00:10:03 -05:00
orbitcowboy
cabafca5ae
windows.cfg: Added some constants from WinUser.h
2020-07-01 16:14:59 +02:00
Daniel Marjamäki
c3749625f3
Merge pull request #2688 from jpyllman/fix_chklibfunc
...
not report locally declared functions as missing configuration of --check-library
2020-06-27 06:53:09 +02:00
orbitcowboy
b33326bf51
windows.cfg: Added a regression test for GetSystemInfo that ensure no uninitvar-FP is shown.
2020-06-26 20:45:18 +02:00
Jens Yllman
a87686911a
one more test updated for the new checkLibraryFunction
2020-06-23 09:06:54 +02:00
Jens Yllman
aa380e0de1
fix a test that was suppressed because #9002
2020-06-19 23:04:15 +02:00
Ken-Patrick Lehrmann
c297ed8204
Better handle noreturn or throwing functions in valueflow
...
Teaching cppcheck about `BOOST_THROW_EXCEPTION` and
`boost::throw_exception`, and using noreturn information from libraries
in value flow.
This fixes false positive nullPointerRedundantCheck with the following
code:
```
void throwexception(int * buf)
{
if (!buf)
boost::throw_exception(std::bad_alloc());
*buf = 0;
}
```
2020-06-17 19:06:14 +02:00
orbitcowboy
a3d58a9302
std.cfg: Allow scientific floating point notation for '<valid>'-tags
2020-06-12 08:51:33 +02:00
orbitcowboy
e767bb8ff3
std.cfg: Added tests for 'atanh'
2020-06-11 15:13:19 +02:00
orbitcowboy
0fe0e56986
std.cfg: Added tests for 'acosh'
2020-06-11 15:07:35 +02:00
orbitcowboy
4880f30dc3
std.cfg: Added tests for 'aligned_alloc'
2020-06-10 19:33:22 +02:00
Sebastian
5cbed0464c
opencv2.cfg: Add types, macros, functions and memory (de)allocation ( #2620 )
...
* opencv2.cfg: Add types, macros, functions and memory (de)allocation
* cfg/cppcheck-cfg.rng: Allow alloc/realloc functions in classes
2020-05-30 17:41:44 +02:00
orbitcowboy
5142c9e9ed
wxwidgets.cfg: Fixed containerOutOfBounds-false negatives for wxArrayInt and wxArrayString. These containers have std::vector like implementation
2020-05-23 09:24:01 +02:00
orbitcowboy
184977730c
wxwidgets.cfg: Fixed false positive because Cppcheck cfg is not able to handle overloaded functions
2020-05-01 20:12:42 +02:00
Sebastian
f0e3f9e79a
gtk.cfg: Fix/enhance Gtk library configuration (g_abort and others) ( #2558 )
...
test/CMakeLists.txt: Fix missing INCONCLUSIVE for Gtk configuration test
2020-02-27 13:16:43 +01:00
orbitcowboy
a5ca3cb1f0
wxwidgets.cfg: Fixed FP for wxSizer::Add()
2020-02-26 16:10:10 +01:00
Sebastian
8fd17546ad
qt.cfg: #9650 : Fix missing configuration for QString.chop() ( #2556 )
...
chop() and also remove() change the size of a QString, so they have to
be added in the container configuration accordingly to avoid false
positives.
2020-02-26 10:53:03 +01:00
Sebastian
fb36889d29
gtk.cfg: Fix syntax errors and false positives ( #2552 )
...
A missing definition for g_assert_cmp*() causes syntax errors if code
like g_assert_cmpint(a, ==, b); is encountered.
The function g_hash_table_iter_replace() does not have to be marked
with leak-ignore since the memory could be freed later if corresponding
functions are present in the GHashTable. Since we can not know if this
is the case we have to assume that the memory is freed to avoid false
positives. The same is true for g_hash_table_insert() and
g_hash_table_replace().
2020-02-26 10:33:23 +01:00
orbitcowboy
b32a89924c
wxwidgets.cfg: Added <not-bool/>-flag at more function args.
2020-02-25 21:48:15 +01:00
orbitcowboy
e9937e3acb
wxwidgets.cfg: Fixed recently introduced FP.
2020-02-25 20:23:20 +01:00
orbitcowboy
84d2c86d74
posix.cfg: Added more <not-bool/>-flags.
2020-02-22 14:49:36 +01:00
orbitcowboy
e1eb7e04b5
std.cfg: Added <not-bool/>-flags for some functions from <cwctype>
2020-02-22 14:24:14 +01:00
orbitcowboy
a62ddc6edd
std.cfg: Added <not-bool/>-tag to isblank() function arg.
2020-02-22 09:43:15 +01:00
orbitcowboy
be96abc21a
std.cfg: Added <not-bool/>-tags to <cctype> function args.
2020-02-22 09:39:21 +01:00
Steven Hoving
26e403893c
googletest.cfg; add MATCHER ( #2485 )
2020-01-12 08:11:58 +01:00
Paul Fultz II
42d44f02a2
Use lifetime analysis for checking mismatching containers ( #2456 )
...
* Use lifetimes to check for mismatching containers
* Fix error messages
* Format
* Remove unused variables
* Fix configuration and track iterators through algorithms
* Fix iterator value types in qt config
* Fix library issue with QStringList
* Remove unused functions
* Fix cppcheck errors
2019-12-25 09:32:50 +01:00
orbitcowboy
2ca866f781
wxwidget.cfg: Added support for more interfaces.
2019-12-22 11:11:59 +01:00
Sebastian
de4d44ae2f
opencv2.cfg: Add initial OpenCV 2.x API Library Configuration ( #2439 )
2019-12-10 19:34:30 +01:00
Dmitry-Me
8af2ee968e
Fix incorrect usage of "unlikely" hint
2019-11-27 18:08:10 +03:00
Dmitry-Me
45e617f50b
Fix -Wint-conversion warning
2019-11-27 18:08:10 +03:00
Dmitry-Me
8f72a714d1
Fix -Wint-conversion warning
2019-11-26 18:03:47 +03:00
Armin Müller
130ebe4b85
Typos found by running "codespell" ( #2380 )
2019-11-19 20:02:24 +01:00
orbitcowboy
2ff18b76ec
test std.cfg: Improved tests for strncpy and strrchr .
2019-11-18 13:53:42 +01:00
orbitcowboy
d5d2915873
test std.cfg: Improved tests for strncmp and strncat.
2019-11-18 13:43:49 +01:00
orbitcowboy
dbbb7f544a
test std.cfg: Improved strlen() tests.
2019-11-14 16:45:27 +01:00
orbitcowboy
ea92695e54
test std.cfg: Improved sscanf() tests.
2019-11-14 16:38:30 +01:00
orbitcowboy
ade54bef3f
test std.cfg: Added better tests.
2019-11-14 10:48:23 +01:00
orbitcowboy
dd30f37642
std.cfg: Merged 'wcscmp' and 'strcmp' configurations and added better tests.
2019-11-14 08:43:31 +01:00
orbitcowboy
20e2c513b6
test std.cfg: Added better test cases for toupper() and tolower().
2019-11-14 08:31:00 +01:00
orbitcowboy
09eaa412b1
std.cfg: Improved cfg for 'mbstowcs'
2019-11-13 16:55:17 +01:00
orbitcowboy
aa5c42ffc5
test std.cfg: Addressed comments from 177eed122a (comments)
2019-11-13 15:07:57 +01:00
orbitcowboy
177eed122a
std.cfg: Added 'indirect' flag for destination argument of 'mbstrtowc' function.
2019-11-13 14:34:02 +01:00
orbitcowboy
02adb60f08
test std.cfg: Added a regression test for std::vsprintf(). The first argument is allowed to be a null pointer.
2019-11-11 09:29:16 +01:00
orbitcowboy
c358688c68
Formatted code. There are no functional changes. [ci skip]
2019-11-07 11:29:37 +01:00
KenPatrickLehrmann
1114dc0536
Enhance handling of assertion from googletest ( #2331 )
...
* Enhance handling of assertion from googletest
* Update googletest, and add it to cmake build
* Enhance ASSERT_STR* in googletest.cfg
2019-11-06 21:38:01 +01:00
orbitcowboy
f59a2b491d
#9455 : Added a test case.
2019-11-05 14:00:50 +01:00
Sebastian
8b2903d5ce
openssl.cfg: Add OpenSSL library configuration with tests ( #2248 )
...
* openssl.cfg: Add OpenSSL library configuration with tests
Reference: https://www.openssl.org/docs/man1.1.1/man3/
* openssl.cfg: Add some configurations for EVP functions
Add alloc/dealloc configuration for EVP_CIPHER_CTX_new and
EVP_CIPHER_CTX_free.
Add configuration for encryption functions that are used in example code
which is added to the tests.
2019-10-31 09:21:08 +01: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
8fb794e731
libsigc++.cfg: Add configuration for library libsigc++ ( #2291 )
...
* libsigc++.cfg: Add configuration for library libsigc++
Reference: https://libsigcplusplus.github.io/libsigcplusplus/
* Make code compatible with libsigc++-2.0 instead of 3.0
Since Version 3.0 C++14 is required which is not (fully) supported in
some older GCC versions.
2019-10-26 17:37:14 +02:00
orbitcowboy
24d6794ba6
windows.cfg: Added support for more interfaces.
2019-10-21 10:09:20 +02:00
versat
6cf0aed737
test/cfg/runtests.sh: Remove verbose output (meant for debugging)
2019-10-21 08:53:21 +02:00
versat
094caf31ac
std.cfg: Remove redundant configurations for vector::(push|pop)_back()
...
Add tests in std.cpp to verify that a configuration for the functions
exists.
2019-10-18 12:40:10 +02:00
Sebastian
8eea046e5b
std.cfg: Add support for std::fill_n() ( #2273 )
...
Reference: https://en.cppreference.com/w/cpp/algorithm/fill_n
2019-10-18 12:24:57 +02:00
Sebastian
478625c802
kde.cfg: Add KDE configuration and tests ( #2278 )
...
Reference: https://kde.org
2019-10-17 21:29:32 +02:00
orbitcowboy
7c48874793
#9347 : Added a robustness test for scanf
2019-10-17 17:50:26 +02:00
Sebastian
e3fe559f0d
windows.cfg: Add support for `__alignof()` ( #2271 )
...
Reference:
https://docs.microsoft.com/en-us/cpp/cpp/alignof-operator?view=vs-2019
2019-10-15 16:02:28 +02: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
e24008544e
test/cfg/std.c: Add nullPointer tests for vsnprintf() ( #2262 )
...
Related tickets:
https://trac.cppcheck.net/ticket/9408
https://trac.cppcheck.net/ticket/9410
2019-10-11 20:00:10 +02:00
versat
77c711d129
gnu.cfg: Add configuration and test for __builtin_assume_aligned()
2019-10-10 10:23:21 +02:00
Sebastian
4d305d5c54
googletest.cfg: Fix #9397 (syntaxError when macro is unknown) ( #2255 )
...
Also add test in googletest.cpp
2019-10-09 19:53:58 +02:00
versat
93e9e12aa1
gtk.cfg: Add some missing g_str*() functions found by daca@home
2019-10-08 10:01:38 +02:00
Daniel Marjamäki
a09fe763d9
Try to make Travis happy
2019-09-28 20:43:55 +02:00
Sebastian
0fadae78d3
boost.cfg: Add configuration and tests for boost::bind() ( #2206 )
2019-09-25 12:49:05 +02:00
Sebastian
5615da4547
std.cfg: Add configuration and tests for std::bind() ( #2207 )
...
TODO:
Somehow Cppcheck fails to print an ignoredReturnValue message when the
return value is not used (see ticket
https://trac.cppcheck.net/ticket/9369 )
2019-09-24 12:16:13 +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
Sebastian
8207fb7b14
cairo.cfg: Add library configuration/tests/... for cairo library ( #2176 )
...
Reference: https://www.cairographics.org/
2019-09-19 08:48:04 +02:00
versat
076c604de8
python.cfg: Improve Python C API configuration
...
Add configurations for types, macros, alloc/dealloc and functions.
2019-09-18 15:09:13 +02:00
versat
d08539fe17
windows.cfg: Fix PostMessage() configuration
...
First argument is optional (allowed to be NULL). See also the annotation
"_In_opt_".
Reference:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-postmessagea
2019-09-18 09:22:57 +02:00
Sebastian
5bf6bd1f5e
windows.cfg: Enhance/fix Windows configuration ( #2177 )
...
Add/fix some missing/incorrect function configurations found by
analyzing TortoiseGit project.
Add some macros.
2019-09-18 08:41:37 +02:00
Sebastian
fbbaea3cd9
qt.cfg: Add some missing macro definitions ( #2175 )
...
Found by daca@home
2019-09-16 15:58:35 +02:00
Paul Fultz II
ba037837c9
Track lifetime across multiple returns
...
This will now warn when doing something like this:
```cpp
template <class T, class K, class V>
const V& get_default(const T& t, const K& k, const V& v) {
auto it = t.find(k);
if (it == t.end()) return v;
return it->second;
}
const int& bar(const std::unordered_map<int, int>& m, int k) {
auto x = 0;
return get_default(m, k, x);
}
```
The lifetime warning is considered inconclusive in this case.
I also updated valueflow to no tinject inconclusive values unless `--inconclusive` flag is passed. This creates some false negatives because library functions are not configured to not modify their input parameters, and there are some checks that do not check if the value is inconclusive or not.
2019-09-11 19:25:09 +02:00
orbitcowboy
da29a1f56b
gnu/bsd.cfg: Cleanup redundant configuration for timercmp() and add more tests.
2019-09-10 11:51:47 +02:00