Q_GLOBAL_STATIC failed to expand macro, cppcheck
Unsolved
General and Desktop
-
I'm using Qt 6.5.2 and cppcheck 2.7 on Ubuntu 22.04.5.
I compile and run code like this without any problem in QtCreator:
Q_GLOBAL_STATIC(const QString, ExampleContext, "ExampleInterface")
But i get a warning when i run cppcheck --qt=library ... (version 2.7)
"failed to expand Q_GLOBAL_STATIC
Wrong number of parameters for macro"I included header <QGlobalStatic> witch points to
#define Q_GLOBAL_STATIC(TYPE, NAME, ...) \ Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, (__VA_ARGS__))
I'dont know whats wrong here.
-
Hi,
Are you sure that this version of cppcheck has definitions that supports this macro ?