cppcheck/test
rikardfalkeborn 613dc19b68 #4241: Check for address of single character passed as string (#1381)
* #4241: Check for address of single character passed as string

Add a check that address of a single character is not passed as argument
to argument marked as strings (using strz). The check does not warn if
the address of a character with known value '\0'.

Since ValueFlow currently does not handle global constants (see #7597),
do not warn if the variable is global to avoid FPs when the address of
a global variable assigned to '\0' is passed to a function expecting a
string.

Remove comment in docs saying strz is unused.

* Change asdf to Hello world

* Add test of address to first element in string

* Add error reporting function to getErrorMessages

* Fix strings in test
2018-10-14 18:49:34 +02:00
..
cfg #4241: Check for address of single character passed as string (#1381) 2018-10-14 18:49:34 +02:00
synthetic Improve Python code 2017-06-05 13:23:00 +02:00
CMakeLists.txt Fixed #7660 (cmake build does not handle simplecpp) 2016-08-06 18:21:54 +02:00
options.cpp Updated copyright year 2018-01-14 15:37:52 +01:00
options.h Updated copyright year 2018-01-14 15:37:52 +01:00
redirect.h Updated copyright year 2018-01-14 15:37:52 +01:00
test.cxx
test64bit.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testassert.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testastutils.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testautovariables.cpp Fix issue 8740: Add a pass to check for valid operators (#1372) 2018-09-08 21:10:34 +02:00
testbool.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testboost.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testbufferoverrun.cpp Fixed #7718 (False positive: out of bounds of already resized std::string) 2018-10-09 06:53:26 +02:00
testcharvar.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testclass.cpp Fixed #8693 (Template specialization: Constructor detected as normal … (#1418) 2018-10-14 16:57:07 +02:00
testcmdlineparser.cpp Improved const correctness of local variables. (#1396) 2018-09-24 15:08:16 +02:00
testcondition.cpp Fixed #8735 (FP oppositeInnerCondition - regression) 2018-10-07 18:30:29 +02:00
testconstructors.cpp CheckClass: Restore a few warnings about member initialization of classes 2018-06-29 22:54:12 +02:00
testcppcheck.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testerrorlogger.cpp --suppress on line 0 (#1354) 2018-09-18 12:58:14 +02:00
testexceptionsafety.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testfilelister.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testfiles.pri testrunner: Add testplatform to verify platform loading (#1176) 2018-04-18 16:12:35 +02:00
testfunctions.cpp #4241: Check for address of single character passed as string (#1381) 2018-10-14 18:49:34 +02:00
testgarbage.cpp astyle formatting 2018-10-13 18:42:09 +02:00
testimportproject.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testincompletestatement.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testinternal.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testio.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testleakautovar.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testlibrary.cpp Rename Library::isargvalid() 2018-07-15 23:05:48 +02:00
testmathlib.cpp Improved const correctness of local variables. (#1396) 2018-09-24 15:08:16 +02:00
testmemleak.cpp Fix FP with fclose after comma (#7525) (#1407) 2018-10-01 11:58:27 +02:00
testnullpointer.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testoptions.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testother.cpp Fix #8230: FP unknown evaluation order on comma expression in while clause (#1415) 2018-10-09 14:44:01 +02:00
testpath.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testpathmatch.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testplatform.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testpostfixoperator.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testpreprocessor.cpp Fixed handling of macros with known value defined in header file in configuration splitting (#8404) 2018-10-08 16:38:47 +02:00
testrunner.cpp Updated copyright year 2018-10-13 18:20:31 +02:00
testrunner.vcxproj Visual Studio: testrunner: Add missing testastutils (#1186) 2018-04-23 20:03:06 +02:00
testrunner.vcxproj.filters Visual Studio: testrunner: Add missing testastutils (#1186) 2018-04-23 20:03:06 +02:00
testsamples.cpp Improved const correctness of local variables. (#1396) 2018-09-24 15:08:16 +02:00
testsimplifytemplate.cpp Fixed #8693 (Template specialization: Constructor detected as normal … (#1418) 2018-10-14 16:57:07 +02:00
testsimplifytokens.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testsimplifytypedef.cpp Allow syntax "typedef 'typename' unsigned 'typename' (functon_name)()" (#1334) 2018-08-16 14:30:28 +02:00
testsizeof.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
teststl.cpp STL: enable inconclusive warnings with --inconclusive 2018-10-09 20:10:43 +02:00
teststring.cpp Fix wrong message 2018-08-12 08:01:15 +02:00
testsuite.cpp CheckStl: rewrite and refactor out of bounds checker 2018-08-11 11:40:48 +02:00
testsuite.h Improved const correctness of local variables. (#1396) 2018-09-24 15:08:16 +02:00
testsuppressions.cpp Fixed compiler warning from VS2017: testsuppressions.cpp(450): warning C4458: declaration of 'errmsg' hides class member. (#1397) 2018-09-25 17:19:25 +02:00
testsymboldatabase.cpp isVariableDeclaration: Handle pointer to const pointer (#1395) 2018-09-25 06:19:26 +02:00
testthreadexecutor.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testtimer.cpp Fix testrunner compiling 2018-06-16 22:28:14 +02:00
testtoken.cpp Improved const correctness of local variables. (#1396) 2018-09-24 15:08:16 +02:00
testtokenize.cpp Fixed #7887 (User function 'search' is wrongly mixed with std function) 2018-10-10 17:35:53 +02:00
testtokenlist.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testtype.cpp Improved const correctness of local variables. (#1396) 2018-09-24 15:08:16 +02:00
testuninitvar.cpp Ticket #8734: Skip static member variables in CheckUninitVar. (#1388) 2018-09-22 16:52:34 +02:00
testunusedfunctions.cpp Fixed #8677 (False positive: unused method) 2018-08-08 11:31:35 +02:00
testunusedprivfunc.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testunusedvar.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testutils.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testvaarg.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testvalueflow.cpp ValueFlow: Fix false positive for container size 2018-09-08 10:43:08 +02:00
testvarid.cpp Fixed #8664 (setVarId: Wrongly set varid for lambda argument) 2018-10-07 20:40:59 +02:00