From b31e98d477b5bc6a44b96ca1ea73c748e2fbb791 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Sun, 19 Apr 2015 01:07:51 +0200 Subject: Don't use anonymous types declared in an anonymous union At least clang is unhappy with them when -Wnested-anon-types is enabled. Change-Id: Ia9869fecb836b27be69f7b9715fd614f384bb912 Reviewed-by: Allan Sandfeld Jensen --- src/gui/painting/qrgba64.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gui/painting/qrgba64.h b/src/gui/painting/qrgba64.h index 51ce4ab10d..5316e32c57 100644 --- a/src/gui/painting/qrgba64.h +++ b/src/gui/painting/qrgba64.h @@ -40,13 +40,15 @@ QT_BEGIN_NAMESPACE class QRgba64 { + struct qrgba_t { + quint16 red; + quint16 green; + quint16 blue; + quint16 alpha; + }; + union { - struct { - quint16 red; - quint16 green; - quint16 blue; - quint16 alpha; - } c; + struct qrgba_t c; quint64 rgba; }; public: -- cgit v1.2.3