This is (rather obscure looking) generated, buildable code from our codebase, with INITIALIZER being a macro defined somewhere else.
Could you please check?
Thanks,
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need to configure that macro somehow. I would recommend in a library file. If you create some genivi-common-api.cfg that defines this INITIALIZER and whatever other features you think is useful, I will be happy to add that in the cppcheck repo and distribute it.
in a library file you can provide additional information that is not available in normal headers. and get stronger cppcheck analysis than would be possible if cppcheck just used the header.
if there is some functions that you use often that has some semantics, for instance allowed value range, allocates/deallocates memory / buffer size can be checked / buffer must be initialized / ... then feel free to ask how to configure that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
the latest cppcheck exits with a syntax error on this valid code:
namespace v1 {
int createEx1()
{
return 0;
}
INITIALIZER(registerEx1)
{}
}
error: syntax error [syntaxError]
INITIALIZER(registerEx1)
This is (rather obscure looking) generated, buildable code from our codebase, with INITIALIZER being a macro defined somewhere else.
Could you please check?
Thanks,
Martin
The macro is defined here:
https://docs.projects.genivi.org/ipc.common-api-runtime/3.1.2/Types_8hpp_source.html
You need to configure that macro somehow. I would recommend in a library file. If you create some
genivi-common-api.cfg
that defines thisINITIALIZER
and whatever other features you think is useful, I will be happy to add that in the cppcheck repo and distribute it.in a library file you can provide additional information that is not available in normal headers. and get stronger cppcheck analysis than would be possible if cppcheck just used the header.
if there is some functions that you use often that has some semantics, for instance allowed value range, allocates/deallocates memory / buffer size can be checked / buffer must be initialized / ... then feel free to ask how to configure that.