Add DE_WARN_UNUSED_TYPE.
authorJarkko Pöyry <jpoyry@google.com>
Tue, 24 Feb 2015 20:37:32 +0000 (12:37 -0800)
committerJarkko Pöyry <jpoyry@google.com>
Wed, 11 Mar 2015 21:01:16 +0000 (14:01 -0700)
- Add DE_WARN_UNUSED_TYPE macro.
- Mark most commonly used types that have non-trivial ctor/dtor pair
  but no intended side-effects with DE_WARN_UNUSED_TYPE.

Change-Id: I9af5c29fcacbec0d9bed0185b60552cb4bccf667

44 files changed:
framework/common/tcuArray.hpp
framework/common/tcuCompressedTexture.hpp
framework/common/tcuEither.hpp
framework/common/tcuFloat.hpp
framework/common/tcuFloatFormat.hpp
framework/common/tcuInterval.hpp
framework/common/tcuMatrix.hpp
framework/common/tcuMaybe.hpp
framework/common/tcuPixelFormat.hpp
framework/common/tcuRGBA.hpp
framework/common/tcuResultCollector.hpp
framework/common/tcuSeedBuilder.hpp
framework/common/tcuStringTemplate.hpp
framework/common/tcuSurface.hpp
framework/common/tcuTexCompareVerifier.hpp
framework/common/tcuTexture.hpp
framework/common/tcuTextureUtil.hpp
framework/common/tcuVector.hpp
framework/delibs/decpp/deArrayBuffer.hpp
framework/delibs/decpp/deBlockBuffer.hpp
framework/delibs/decpp/deDefs.hpp
framework/delibs/decpp/deRandom.hpp
framework/opengl/gluCallLogWrapper.hpp
framework/opengl/gluDrawUtil.hpp
framework/opengl/gluObjectWrapper.hpp
framework/opengl/gluRenderConfig.hpp
framework/opengl/gluRenderContext.hpp
framework/opengl/gluTexture.hpp
framework/opengl/gluTextureUtil.hpp
framework/opengl/gluVarType.hpp
framework/opengl/simplereference/sglrContext.hpp
framework/opengl/simplereference/sglrGLContext.hpp
framework/opengl/simplereference/sglrReferenceContext.hpp
framework/opengl/simplereference/sglrShaderProgram.hpp
framework/referencerenderer/rrFragmentOperations.hpp
framework/referencerenderer/rrGenericVector.hpp
framework/referencerenderer/rrMultisamplePixelBufferAccess.hpp
framework/referencerenderer/rrPrimitiveAssembler.hpp
framework/referencerenderer/rrPrimitivePacket.hpp
framework/referencerenderer/rrRasterizer.hpp
framework/referencerenderer/rrRenderer.hpp
framework/referencerenderer/rrShaders.hpp
framework/referencerenderer/rrVertexAttrib.hpp
framework/referencerenderer/rrVertexPacket.hpp

index 26b1cf9..14a9bd9 100644 (file)
@@ -46,7 +46,7 @@ public:
 
 private:
        T                               m_data[Size];
-};
+} DE_WARN_UNUSED_TYPE;
 
 
 template <typename T, int Size>
index 9266cfb..35d7956 100644 (file)
@@ -133,7 +133,7 @@ private:
        int                                             m_height;
        int                                             m_depth;
        std::vector<deUint8>    m_data;
-};
+} DE_WARN_UNUSED_TYPE;
 
 void decompress (const PixelBufferAccess& dst, CompressedTexFormat fmt, const deUint8* src, const TexDecompressionParams& params = TexDecompressionParams());
 
index 47a3c49..40c326a 100644 (file)
@@ -78,7 +78,7 @@ private:
                deUint8         m_data[sizeof(First) > sizeof(Second) ? sizeof(First) : sizeof(Second)];
                deUint64        m_align;
        };
-};
+} DE_WARN_UNUSED_TYPE;
 
 namespace EitherDetail
 {
index 336fa8b..c25692d 100644 (file)
@@ -125,7 +125,7 @@ public:
 
 private:
        StorageType                             m_value;
-};
+} DE_WARN_UNUSED_TYPE;
 
 // Common floating-point types.
 typedef Float<deUint16,  5, 10,   15, FLOAT_HAS_SIGN|FLOAT_SUPPORT_DENORM>     Float16;        //!< IEEE 754-2008 16-bit floating-point value
index f58a6c7..165c781 100644 (file)
@@ -81,7 +81,7 @@ private:
        YesNoMaybe                      m_hasNaN;                       // Does the format support NaNs?
        bool                            m_exactPrecision;       // Are larger precisions disallowed?
        double                          m_maxValue;                     // Largest representable finite value.
-};
+} DE_WARN_UNUSED_TYPE;
 
 void           FloatFormat_selfTest    (void);
 
index 2a87347..0a2f65f 100644 (file)
@@ -150,7 +150,7 @@ private:
        bool            m_hasNaN;
        double          m_lo;
        double          m_hi;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Interval        operator+       (const Interval& x) { return x; }
 Interval               exp2            (const Interval& x);
index ee55784..31e9346 100644 (file)
@@ -73,7 +73,7 @@ public:
 
 private:
        Vector<Vector<T, Rows>, Cols>   m_data;
-};
+} DE_WARN_UNUSED_TYPE;
 
 // Operators.
 
index 135486d..29f39f8 100644 (file)
@@ -57,7 +57,7 @@ private:
                deUint8         m_data[sizeof(T)];
                deUint64        m_align;
        };
-};
+} DE_WARN_UNUSED_TYPE;
 
 template<typename T>
 Maybe<T> nothing (void)
index 0a0197c..2aa60c3 100644 (file)
@@ -108,7 +108,7 @@ struct PixelFormat
        {
                return !(*this == other);
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // namespace tcu
 
index b00ea19..c5d3243 100644 (file)
@@ -102,7 +102,7 @@ public:
 
 private:
        deUint32        m_value;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline bool compareEqualMasked (RGBA a, RGBA b, deUint32 cmpMask)
 {
index 7860147..6398f0a 100644 (file)
@@ -61,7 +61,7 @@ private:
        std::string             m_prefix;
        qpTestResult    m_result;
        std::string             m_message;
-};
+} DE_WARN_UNUSED_TYPE;
 
 
 } // tcu
index 9dba292..f33f2eb 100644 (file)
@@ -45,7 +45,7 @@ public:
 
 private:
        deUint32        m_hash;
-};
+} DE_WARN_UNUSED_TYPE;
 
 SeedBuilder& operator<< (SeedBuilder& builder, bool value);
 SeedBuilder& operator<< (SeedBuilder& builder, deInt8 value);
index 4e60b1d..31d6a30 100644 (file)
@@ -45,7 +45,7 @@ private:
        StringTemplate&         operator=                       (const StringTemplate&);                // not allowed!
 
        std::string                     m_template;
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // tcu
 
index ef8f95e..89f2073 100644 (file)
@@ -65,7 +65,7 @@ private:
        int                                             m_width;
        int                                     m_height;
        std::vector<deUint32>   m_pixels;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline void Surface::setPixel (int x, int y, RGBA col)
 {
index 5479bf5..25438bf 100644 (file)
@@ -50,7 +50,7 @@ struct TexComparePrecision
                , resultBits    (16)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 bool           isTexCompareResultValid                         (const Texture2DView&           texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec2& coord, const Vec2& lodBounds, const float cmpReference, const float result);
 bool           isTexCompareResultValid                         (const TextureCubeView&         texture, const Sampler& sampler, const TexComparePrecision& prec, const Vec3& coord, const Vec2& lodBounds, const float cmpReference, const float result);
index fd69111..b0e0435 100644 (file)
@@ -116,7 +116,7 @@ public:
        {
                return (order != other.order || type != other.type);
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Sampling parameters
@@ -226,7 +226,7 @@ public:
                , seamlessCubeMap       (false)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 // Calculate pitches for pixel data with no padding.
 IVec3 calculatePackedPitch (const TextureFormat& format, const IVec3& size);
@@ -290,7 +290,7 @@ protected:
        IVec3                                   m_size;
        IVec3                                   m_pitch;        //!< (pixelPitch, rowPitch, slicePitch)
        mutable void*                   m_data;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Read-write pixel data access
@@ -320,7 +320,7 @@ public:
 
        void                            setPixDepth                     (float depth, int x, int y, int z = 0) const;
        void                            setPixStencil           (int stencil, int x, int y, int z = 0) const;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Generic pixel data container
@@ -359,7 +359,7 @@ private:
        de::ArrayBuffer<deUint8>        m_data;
 
        friend class ConstPixelBufferAccess;
-};
+} DE_WARN_UNUSED_TYPE;
 
 Vec4   sampleLevelArray1D                              (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, int level, float lod);
 Vec4   sampleLevelArray2D                              (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, int depth, float lod);
@@ -399,7 +399,7 @@ struct CubeFaceCoords
 
                                        CubeFaceCoords          (CubeFace face_, T s_, T t_) : face(face_), s(s_), t(t_) {}
                                        CubeFaceCoords          (CubeFace face_, const Vector<T, 2>& c) : face(face_), s(c.x()), t(c.y()) {}
-};
+} DE_WARN_UNUSED_TYPE;
 
 typedef CubeFaceCoords<float>  CubeFaceFloatCoords;
 typedef CubeFaceCoords<int>            CubeFaceIntCoords;
@@ -430,7 +430,7 @@ public:
 protected:
        int                                                             m_numLevels;
        const ConstPixelBufferAccess*   m_levels;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Texture1DView::Texture1DView (int numLevels, const ConstPixelBufferAccess* levels)
        : m_numLevels   (numLevels)
@@ -484,7 +484,7 @@ public:
 protected:
        int                                                             m_numLevels;
        const ConstPixelBufferAccess*   m_levels;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Texture2DView::Texture2DView (int numLevels, const ConstPixelBufferAccess* levels)
        : m_numLevels   (numLevels)
@@ -554,7 +554,7 @@ private:
        TextureFormat                                   m_format;
        std::vector<LevelData>                  m_data;
        std::vector<PixelBufferAccess>  m_access;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief 1D Texture reference implementation
@@ -588,7 +588,7 @@ public:
 private:
        int                                                             m_width;
        Texture1DView                                   m_view;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Vec4 Texture1D::sample (const Sampler& sampler, float s, float lod) const
 {
@@ -639,7 +639,7 @@ private:
        int                                                             m_width;
        int                                                             m_height;
        Texture2DView                                   m_view;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Vec4 Texture2D::sample (const Sampler& sampler, float s, float t, float lod) const
 {
@@ -694,7 +694,7 @@ public:
 protected:
        int                                                             m_numLevels;
        const ConstPixelBufferAccess*   m_levels[CUBEFACE_LAST];
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Cube Map Texture reference implementation
@@ -735,7 +735,7 @@ private:
        std::vector<LevelData>                  m_data[CUBEFACE_LAST];
        std::vector<PixelBufferAccess>  m_access[CUBEFACE_LAST];
        TextureCubeView                                 m_view;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Vec4 TextureCube::sample (const Sampler& sampler, float s, float t, float p, float lod) const
 {
@@ -781,7 +781,7 @@ protected:
 
        int                                                             m_numLevels;
        const ConstPixelBufferAccess*   m_levels;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief 2D Array Texture View
@@ -811,7 +811,7 @@ protected:
 
        int                                                             m_numLevels;
        const ConstPixelBufferAccess*   m_levels;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief 1D Array Texture reference implementation
@@ -847,7 +847,7 @@ private:
        int                                                             m_width;
        int                                                             m_numLayers;
        Texture1DArrayView                              m_view;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Vec4 Texture1DArray::sample (const Sampler& sampler, float s, float t, float lod) const
 {
@@ -908,7 +908,7 @@ private:
        int                                                             m_height;
        int                                                             m_numLayers;
        Texture2DArrayView                              m_view;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Vec4 Texture2DArray::sample (const Sampler& sampler, float s, float t, float r, float lod) const
 {
@@ -961,7 +961,7 @@ public:
 protected:
        int                                                             m_numLevels;
        const ConstPixelBufferAccess*   m_levels;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Vec4 Texture3DView::sample (const Sampler& sampler, float s, float t, float r, float lod) const
 {
@@ -1007,7 +1007,7 @@ private:
        int                                                             m_height;
        int                                                             m_depth;
        Texture3DView                                   m_view;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Vec4 Texture3D::sample (const Sampler& sampler, float s, float t, float r, float lod) const
 {
@@ -1044,7 +1044,7 @@ protected:
 
        int                                                             m_numLevels;
        const ConstPixelBufferAccess*   m_levels;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Cube Map Array Texture reference implementation
@@ -1080,7 +1080,7 @@ private:
        int                                                             m_size;
        int                                                             m_depth;
        TextureCubeArrayView                    m_view;
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline Vec4 TextureCubeArray::sample (const Sampler& sampler, float s, float t, float r, float q, float lod) const
 {
index cfba85b..643a567 100644 (file)
@@ -77,7 +77,7 @@ struct TextureFormatInfo
                , lookupBias    (lookupBias_)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 TextureFormatInfo      getTextureFormatInfo                            (const TextureFormat& format);
 IVec4                          getTextureFormatBitDepth                        (const TextureFormat& format);
index e608683..1098192 100644 (file)
@@ -169,7 +169,7 @@ public:
 
        template <int NewSize>
        Vector<T, NewSize>              toWidth         (void) const;
-};
+} DE_WARN_UNUSED_TYPE;
 
 template <typename T, int Size>
 inline Vector<T, Size>::Vector (void)
index 6a8fc07..0ecb690 100644 (file)
@@ -68,7 +68,7 @@ public:
 private:
        void*                   m_ptr;
        size_t                  m_cap;
-};
+} DE_WARN_UNUSED_TYPE;
 
 template <typename T, size_t Alignment, size_t Stride>
 ArrayBuffer<T,Alignment,Stride>::ArrayBuffer (void) throw()
index e0480fc..ccdbe87 100644 (file)
@@ -93,7 +93,7 @@ private:
        Mutex                   m_readLock;
 
        volatile deUint32       m_canceled;
-};
+} DE_WARN_UNUSED_TYPE;
 
 template <typename T>
 BlockBuffer<T>::BlockBuffer (int blockSize, int numBlocks)
index e07af19..6daa835 100644 (file)
@@ -132,4 +132,20 @@ const Elem& getArrayElement (const Elem (&array)[Size], int offset)
 #      define DE_EMPTY_CPP_FILE
 #endif
 
+// Warn if type is constructed, but left unused
+//
+// Used in types with non-trivial ctor/dtor but with ctor-dtor pair causing no (observable)
+// side-effects.
+//
+// \todo add attribute for GCC
+#if (DE_COMPILER == DE_COMPILER_CLANG) && defined(__has_attribute)
+#      if __has_attribute(warn_unused)
+#              define DE_WARN_UNUSED_TYPE __attribute__((warn_unused))
+#      else
+#              define DE_WARN_UNUSED_TYPE
+#      endif
+#else
+#      define DE_WARN_UNUSED_TYPE
+#endif
+
 #endif // _DEDEFS_HPP
index 290bf63..a048622 100644 (file)
@@ -72,7 +72,7 @@ public:
 
 private:
        deRandom                m_rnd;
-};
+} DE_WARN_UNUSED_TYPE;
 
 // Inline implementations
 
index 490338c..9be2573 100644 (file)
@@ -52,7 +52,7 @@ private:
        const glw::Functions&   m_gl;
        tcu::TestLog&                   m_log;
        bool                                    m_enableLog;
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // glu
 
index 38bacef..7108b7e 100644 (file)
@@ -138,7 +138,7 @@ struct VertexArrayPointer
                , data                  (0)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct VertexArrayBinding
 {
@@ -154,7 +154,7 @@ struct VertexArrayBinding
        VertexArrayBinding (void)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct PrimitiveList
 {
@@ -186,7 +186,7 @@ struct PrimitiveList
                , indices               (0)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 class DrawUtilCallback
 {
index 09c10db..5d02d84 100644 (file)
@@ -79,7 +79,7 @@ protected:
 private:
                                                        ObjectWrapper           (const ObjectWrapper& other);
        ObjectWrapper&                  operator=                       (const ObjectWrapper& other);
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief API object wrapper template.
@@ -90,7 +90,7 @@ public:
                                TypedObjectWrapper (const glw::Functions& gl, deUint32 object) : ObjectWrapper(gl, objectTraits(Type), object) {}
        explicit        TypedObjectWrapper (const RenderContext& context) : ObjectWrapper(context.getFunctions(), objectTraits(Type)) {}
        explicit        TypedObjectWrapper (const glw::Functions& gl) : ObjectWrapper(gl, objectTraits(Type)) {}
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief API object vector.
@@ -118,7 +118,7 @@ private:
        const glw::Functions&                           m_gl;
        const ObjectTraits&                                     m_traits;
        std::vector<deUint32>                           m_objects;
-};
+} DE_WARN_UNUSED_TYPE;
 
 template<ObjectType Type> class TypedObjectVector : public ObjectVector
 {
index ea3ecd4..44f2919 100644 (file)
@@ -96,7 +96,7 @@ struct RenderConfig
                , numSamples            (DONT_CARE)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 // Utilities
 
index fd69ffb..ed067e4 100644 (file)
@@ -106,7 +106,7 @@ protected:
                MINOR_SHIFT             = MAJOR_SHIFT+MAJOR_BITS,
                PROFILE_SHIFT   = MINOR_SHIFT+MINOR_BITS
        };
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline deUint32 ApiType::pack (int major, int minor, Profile profile)
 {
@@ -158,7 +158,7 @@ protected:
                TOTAL_CONTEXT_BITS      = TOTAL_API_BITS+FLAGS_BITS,
                FLAGS_SHIFT                     = TOTAL_API_BITS
        };
-};
+} DE_WARN_UNUSED_TYPE;
 
 inline ContextType::ContextType (int major, int minor, Profile profile, ContextFlags flags)
        : ApiType(major, minor, profile)
index d2058a3..de77b72 100644 (file)
@@ -60,7 +60,7 @@ private:
        deUint32                                m_format;                               //!< Internal format.
        tcu::Texture1D                  m_refTexture;
        deUint32                                m_glTexture;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief 2D Texture
@@ -96,7 +96,7 @@ private:
 
        tcu::Texture2D                  m_refTexture;
        deUint32                                m_glTexture;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Cube Map Texture
@@ -135,7 +135,7 @@ private:
 
        tcu::TextureCube                m_refTexture;
        deUint32                                m_glTexture;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief 2D Array Texture
@@ -169,7 +169,7 @@ private:
 
        tcu::Texture2DArray                     m_refTexture;
        deUint32                                        m_glTexture;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief 1D Array Texture
@@ -198,7 +198,7 @@ private:
 
        tcu::Texture1DArray                     m_refTexture;
        deUint32                                        m_glTexture;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief 3D Texture
@@ -227,7 +227,7 @@ private:
 
        tcu::Texture3D                          m_refTexture;
        deUint32                                        m_glTexture;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Cube Map Array Texture
@@ -258,7 +258,7 @@ private:
 
        tcu::TextureCubeArray                   m_refTexture;
        deUint32                                                m_glTexture;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief 1D Texture Buffer only supported on OpenGL
@@ -303,7 +303,7 @@ private:
        tcu::PixelBufferAccess  m_refTexture;
        deUint32                                m_glTexture;
        deUint32                                m_glBuffer;
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // glu
 
index 9ce102e..ce1633a 100644 (file)
@@ -54,7 +54,7 @@ struct TransferFormat
                , dataType      (dataType_)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 tcu::TextureFormat                             mapGLTransferFormat                                     (deUint32 format, deUint32 dataType);
 tcu::TextureFormat                             mapGLInternalFormat                                     (deUint32 internalFormat);
index f0bfc6e..eb2056b 100644 (file)
@@ -115,7 +115,7 @@ private:
                        array.size                      = 0;
                };
        } m_data;
-};
+} DE_WARN_UNUSED_TYPE;
 
 template <typename T>
 inline VarType varTypeOf (Precision prec = PRECISION_LAST) { return VarType(dataTypeOf<T>(), prec); }
@@ -135,7 +135,7 @@ public:
 private:
        std::string                     m_name;
        VarType                         m_type;
-};
+} DE_WARN_UNUSED_TYPE;
 
 class StructType
 {
@@ -165,7 +165,7 @@ public:
 private:
        std::string                                     m_typeName;
        std::vector<StructMember>       m_members;
-};
+} DE_WARN_UNUSED_TYPE;
 
 enum Storage
 {
@@ -251,7 +251,7 @@ struct Layout
        int                             offset;
        FormatLayout    format;
        MatrixOrder             matrixOrder;
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct VariableDeclaration
 {
@@ -266,7 +266,7 @@ struct VariableDeclaration
        VarType                         varType;
        deUint32                        memoryAccessQualifierBits;
        std::string                     name;
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct InterfaceBlock
 {
@@ -279,7 +279,7 @@ struct InterfaceBlock
        std::string                                                             instanceName;
        std::vector<glu::VariableDeclaration>   variables;
        std::vector<int>                                                dimensions;
-};
+} DE_WARN_UNUSED_TYPE;
 
 //! Internals for declare() utilities.
 namespace decl
index 04eb6fa..72c0bd4 100644 (file)
@@ -211,7 +211,7 @@ public:
 
 private:
        const glu::ContextType  m_type;
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // sglr
 
index 1f09701..d68931d 100644 (file)
@@ -243,7 +243,7 @@ private:
        std::set<deUint32>                                      m_allocatedBuffers;
        std::set<deUint32>                                      m_allocatedVaos;
        std::vector<glu::ShaderProgram*>        m_programs;
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // sglr
 
index 039caed..76de272 100644 (file)
@@ -959,7 +959,7 @@ private:
        rr::FragmentProcessor                                           m_fragmentProcessor;
        std::vector<rr::Fragment>                                       m_fragmentBuffer;
        std::vector<float>                                                      m_fragmentDepths;
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // sglr
 
index fa4af54..dde8289 100644 (file)
@@ -252,7 +252,7 @@ private:
 
        friend class ReferenceContext;  // for uniform access
        friend class GLContext;                 // for source string access
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // sglr
 
index 39a1f0f..bd4315a 100644 (file)
@@ -76,7 +76,7 @@ struct Fragment
                , sampleDepths  (DE_NULL)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 // These functions are for clearing only a specific pixel rectangle in a multisample buffer.
 // When clearing the entire buffer, tcu::clear, tcu::clearDepth and tcu::clearStencil can be used.
@@ -149,7 +149,7 @@ private:
        void            executeUnsignedValueWrite               (int fragNdxOffset, int numSamplesPerFragment, const Fragment* inputFragments, const tcu::BVec4& colorMask, const tcu::PixelBufferAccess& colorBuffer);
 
        SampleData      m_sampleRegister[SAMPLE_REGISTER_SIZE];
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // rr
 
index 07d77a7..aadae19 100644 (file)
@@ -106,7 +106,7 @@ public:
 
        template<typename ScalarType>
        inline const ScalarType* getAccess () const;
-};
+} DE_WARN_UNUSED_TYPE;
 
 template<>
 inline float* GenericVec4::getAccess<float> ()
index 51d4d1b..975ef80 100644 (file)
@@ -54,7 +54,7 @@ public:
 
 private:
        tcu::PixelBufferAccess                                          m_access;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Read-only pixel data access to multisampled buffers.
@@ -82,7 +82,7 @@ public:
 
 private:
        tcu::ConstPixelBufferAccess                                     m_access;
-};
+} DE_WARN_UNUSED_TYPE;
 
 // Multisampled versions of tcu-utils
 
index 5dc1603..5c2f7bd 100644 (file)
@@ -72,7 +72,7 @@ struct Triangle
        VertexPacket*   v2;
 
        int                             provokingIndex;
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct Triangles
 {
@@ -89,7 +89,7 @@ struct Triangles
        {
                return vertices / 3;
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct TriangleStrip
 {
@@ -134,7 +134,7 @@ struct TriangleStrip
        {
                return (vertices < 3) ? (0) : (vertices - 2);
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct TriangleFan
 {
@@ -158,7 +158,7 @@ struct TriangleFan
        {
                return (vertices < 3) ? (0) : (vertices - 2);
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct Line
 {
@@ -197,7 +197,7 @@ struct Line
        VertexPacket*   v1;
 
        int                             provokingIndex;
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct Lines
 {
@@ -214,7 +214,7 @@ struct Lines
        {
                return vertices / 2;
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct LineStrip
 {
@@ -240,7 +240,7 @@ struct LineStrip
        {
                return (vertices < 2) ? (0) : (vertices - 1);
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct LineLoop
 {
@@ -268,7 +268,7 @@ struct LineLoop
        {
                return (vertices < 2) ? (0) : (vertices);
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct Point
 {
@@ -288,7 +288,7 @@ struct Point
        }
 
        VertexPacket* v0;
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct Points
 {
@@ -305,7 +305,7 @@ struct Points
        {
                return (vertices);
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct LineAdjacency
 {
@@ -350,7 +350,7 @@ struct LineAdjacency
        VertexPacket*   v3;
 
        int                             provokingIndex;
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct LinesAdjacency
 {
@@ -367,7 +367,7 @@ struct LinesAdjacency
        {
                return vertices / 4;
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct LineStripAdjacency
 {
@@ -384,7 +384,7 @@ struct LineStripAdjacency
        {
                return (vertices < 4) ? (0) : (vertices - 3);
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct TriangleAdjacency
 {
@@ -436,7 +436,7 @@ struct TriangleAdjacency
        VertexPacket*   v5;     //!< adjacent
 
        int                             provokingIndex;
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct TrianglesAdjacency
 {
@@ -453,7 +453,7 @@ struct TrianglesAdjacency
        {
                return vertices / 6;
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct TriangleStripAdjacency
 {
@@ -505,7 +505,7 @@ struct TriangleStripAdjacency
        {
                return (vertices < 6) ? 0 : ((vertices - 4) / 2);
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // pa
 } // rr
index ab705ae..a8df5d0 100644 (file)
@@ -43,7 +43,7 @@ struct PrimitivePacket
 {
        int                                             primitiveIDIn;
        const VertexPacket*             vertices[6];
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Geometry emitter
@@ -69,7 +69,7 @@ private:
        size_t                                          m_numEmitted;
        size_t                                          m_maxVertices;
 
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // rr
 
index f1ccd98..b384a8d 100644 (file)
@@ -159,7 +159,7 @@ private:
        tcu::IVec2                              m_bboxMin;              //!< Bounding box min (inclusive).
        tcu::IVec2                              m_bboxMax;              //!< Bounding box max (inclusive).
        tcu::IVec2                              m_curPos;               //!< Current rasterization position.
-};
+} DE_WARN_UNUSED_TYPE;
 
 
 /*--------------------------------------------------------------------*//*!
@@ -200,7 +200,7 @@ private:
        tcu::IVec2                                              m_curPos;                       //!< Current rasterization position.
        deInt32                                                 m_curRowFragment;       //!< Current rasterization position of one fragment in column of lineWidth fragments
        float                                                   m_lineWidth;
-};
+} DE_WARN_UNUSED_TYPE;
 
 
 /*--------------------------------------------------------------------*//*!
@@ -236,7 +236,7 @@ private:
        // Per-line rasterization state.
        TriangleRasterizer                      m_triangleRasterizer0; //!< not in array because we want to initialize these in the initialization list
        TriangleRasterizer                      m_triangleRasterizer1;
-};
+} DE_WARN_UNUSED_TYPE;
 
 
 /*--------------------------------------------------------------------*//*!
index 2fdd43d..f47e4fe 100644 (file)
@@ -55,7 +55,7 @@ public:
        const int                                                               numColorBuffers;
        const MultisamplePixelBufferAccess              depthBuffer;
        const MultisamplePixelBufferAccess              stencilBuffer;
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct Program
 {
@@ -69,7 +69,7 @@ struct Program
        const VertexShader*                     vertexShader;
        const FragmentShader*           fragmentShader;
        const GeometryShader*           geometryShader;
-};
+} DE_WARN_UNUSED_TYPE;
 
 struct DrawIndices
 {
@@ -81,7 +81,7 @@ struct DrawIndices
        const void* const       indices;
        const IndexType         indexType;
        const int                       baseVertex;
-};
+} DE_WARN_UNUSED_TYPE;
 
 class PrimitiveList
 {
@@ -125,7 +125,7 @@ public:
        const VertexAttrib* const       vertexAttribs;
 
        const PrimitiveList&            primitives;
-};
+} DE_WARN_UNUSED_TYPE;
 
 class Renderer
 {
@@ -135,7 +135,7 @@ public:
 
        void                    draw                    (const DrawCommand& command) const;
        void                    drawInstanced   (const DrawCommand& command, int numInstances) const;
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // rr
 
index a8250fd..0cbfb8b 100644 (file)
@@ -111,7 +111,7 @@ protected:
 
        std::vector<VertexInputInfo>                    m_inputs;
        std::vector<VertexOutputInfo>                   m_outputs;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Fragment shader interface
@@ -134,7 +134,7 @@ protected:
 
        std::vector<FragmentInputInfo>                  m_inputs;
        std::vector<FragmentOutputInfo>                 m_outputs;
-};
+} DE_WARN_UNUSED_TYPE;
 
 /*--------------------------------------------------------------------*//*!
  * \brief Geometry shader input primitive type
@@ -195,7 +195,7 @@ protected:
 
        std::vector<GeometryInputInfo>                  m_inputs;
        std::vector<GeometryOutputInfo>                 m_outputs;
-};
+} DE_WARN_UNUSED_TYPE;
 
 // Helpers for shader implementations.
 
index ab94b94..74846db 100644 (file)
@@ -143,7 +143,7 @@ struct VertexAttrib
                , generic                       (generic_)
        {
        }
-};
+} DE_WARN_UNUSED_TYPE;
 
 bool           isValidVertexAttrib             (const VertexAttrib& vertexAttrib);
 // \todo [2013-04-01 pyry] Queries: isReadFloatValid(), isReadIntValid() ...
index a70a285..1681efe 100644 (file)
@@ -75,7 +75,7 @@ private:
 
 
        friend class VertexPacketAllocator;
-};
+} DE_WARN_UNUSED_TYPE;
 
 
 /*--------------------------------------------------------------------*//*!
@@ -109,7 +109,7 @@ private:
        const size_t                            m_numberOfVertexOutputs;
        std::vector<deInt8*>            m_allocations;
        std::vector<VertexPacket*>      m_singleAllocPool;
-};
+} DE_WARN_UNUSED_TYPE;
 
 } // rr