From: Bradley T. Hughes Date: Wed, 18 Jan 2012 15:15:44 +0000 (+0100) Subject: Silence warning from clang X-Git-Tag: qt-v5.0.0-alpha1~1709 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=085d3af48c1b5e9bd7effe6d73e048829c884af3;p=profile%2Fivi%2Fqtbase.git Silence warning from clang QBasicAtomicPointer is forward declared as a class, keep the actual declaration of QBasicAtomicInteger and QBasicAtomicPointer as class with all public members (qoldbasicatomic.h does the same). src/corelib/thread/qbasicatomic.h:158:1: warning: 'QBasicAtomicPointer' defined as a struct template here but previously declared as a class template [-Wmismatched-tags] struct QBasicAtomicPointer ^ src/corelib/global/qglobal.h:1861:23: note: did you mean struct here? template class QBasicAtomicPointer; ^~~~~ struct Change-Id: I38c59c29d7f796dde772e7f403bbf98b04571a08 Reviewed-by: Lars Knoll --- diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index 7a93a4b..768c1cc 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -63,8 +63,9 @@ QT_MODULE(Core) // New atomics template -struct QBasicAtomicInteger +class QBasicAtomicInteger { +public: typedef QAtomicOps Ops; // static check that this is a valid integer typedef char PermittedIntegerType[QAtomicIntegerTraits::IsInteger ? 1 : -1]; @@ -133,8 +134,9 @@ struct QBasicAtomicInteger typedef QBasicAtomicInteger QBasicAtomicInt; template -struct QBasicAtomicPointer +class QBasicAtomicPointer { +public: typedef X *Type; typedef QAtomicOps Ops; typedef typename Ops::Type AtomicType;