* 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
Detected some errors when checking for redundant function
configurations:
The functions that receive an additional argument "locale" have the
suffix "_l".
Sadly the MSDN shows wrong declarations that are missing the "_l", i
guess this caused the wrong names (I have reported it to Microsoft, but
do not expect that this is fixed soon).
The function configuration for GetModuleHandle* existed twice, i have
merged them, and it looks sane for me now.
It seems to be a copy & paste error.
The comment, the return value, the warn entry and the rest of the
configuration suggest that this must be the getprotobynumber function
configuration and not the getservbyport configuration which would be
redundant as it is configured a bit later.
* Fixed copy&paste error or typo
It should be std::sinf here. std::sinl is described directly in the next function description and does not make sense here because of the return type.
* std.cfg: Fix another copy&paste error or typo
It should be std::tanf here.
* Add support for simple c++ 11 type ailases like: using INT = int;
Only types supported by ValueType are supported. Complex types like
function pointers are not supported. Template type aliases are not
supported.
* Fix crash when type in using type alias is simplified away.
This fixes a crash when size_t is replaced with unsigned long in: using
size_t = unsigned long; by the tokenizer.
This does not fix the problem where Tokenizer::simplifyPlatformTypes()
simplifies away size_t in other cases. This is only a problem when the
new type is different from the platform type.