QLoggingCategory: fix Clang -Wgnu-zero-variadic-macro-arguments (headerclean)

Says Clang 10.0.0 in C++20 mode:

  qtwayland/src/compositor/compositor_api/qwaylandcompositor.h:37:1: error: must specify at least one argument for '...' parameter of variadic macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
  Q_WAYLANDCOMPOSITOR_EXPORT Q_DECLARE_LOGGING_CATEGORY(qLcWaylandCompositor)
                             ^
  qtbase/src/corelib/io/qloggingcategory.h:111:45: note: expanded from macro 'Q_DECLARE_LOGGING_CATEGORY'
      Q_DECLARE_EXPORTED_LOGGING_CATEGORY(name)
                                              ^
  qtbase/src/corelib/io/qloggingcategory.h:107:9: note: macro 'Q_DECLARE_EXPORTED_LOGGING_CATEGORY' defined here
  #define Q_DECLARE_EXPORTED_LOGGING_CATEGORY(name, ...) \
          ^

Amends 7466422e9c.

Change-Id: Ica583cfb32e2b52a4f41f707d4b34a70063f0230
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2022-07-08 17:12:52 +02:00
parent 4d88c80fbd
commit d625876219

View File

@ -108,7 +108,7 @@ template <> const bool QLoggingCategoryMacroHolder<QtWarningMsg>::IsOutputEnable
__VA_ARGS__ const QLoggingCategory &name();
#define Q_DECLARE_LOGGING_CATEGORY(name) \
Q_DECLARE_EXPORTED_LOGGING_CATEGORY(name)
Q_DECLARE_EXPORTED_LOGGING_CATEGORY(name, /* prevent zero variadic arguments */ )
#define Q_LOGGING_CATEGORY(name, ...) \
const QLoggingCategory &name() \