Fix GCC 6.3 warnings in master

Change-Id: I8cf513413c078f1abdb53c93129456039be1e2a9
diff --git a/external/openglcts/CMakeLists.txt b/external/openglcts/CMakeLists.txt
index 2a1a441..8cd93a1 100644
--- a/external/openglcts/CMakeLists.txt
+++ b/external/openglcts/CMakeLists.txt
@@ -6,6 +6,9 @@
 if (DE_COMPILER_IS_GCC OR DE_COMPILER_IS_CLANG)
 	# -Wconversion generates a LOT of warnings in this code base
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-conversion")
+
+	# Same for -Wunused-function
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function")
 endif ()
 
 if (EXISTS "${GTF_HOME}/CMakeLists.txt")
diff --git a/external/openglcts/modules/gl/gl4cGPUShaderFP64Tests.cpp b/external/openglcts/modules/gl/gl4cGPUShaderFP64Tests.cpp
index fad10b9..dfc5673 100644
--- a/external/openglcts/modules/gl/gl4cGPUShaderFP64Tests.cpp
+++ b/external/openglcts/modules/gl/gl4cGPUShaderFP64Tests.cpp
@@ -34,9 +34,10 @@
 
 #include <iomanip>
 
-#include <deMath.h>
-#include <tcuMatrixUtil.hpp>
-#include <tcuVectorUtil.hpp>
+#include "deMath.h"
+#include "deUniquePtr.hpp"
+#include "tcuMatrixUtil.hpp"
+#include "tcuVectorUtil.hpp"
 
 #include <cstdlib>
 #include <cstring>
@@ -15107,7 +15108,7 @@
 	}
 
 	Utils::programInfo			  program(m_context);
-	std::auto_ptr<functionObject> function_object(getFunctionObject(function, type));
+	de::UniquePtr<functionObject> function_object(getFunctionObject(function, type));
 
 	prepareProgram(*function_object, program);
 	prepareTestData(*function_object);
diff --git a/framework/egl/wrapper/eglwImplExt.inl b/framework/egl/wrapper/eglwImplExt.inl
index 43fcad1..9002700 100644
--- a/framework/egl/wrapper/eglwImplExt.inl
+++ b/framework/egl/wrapper/eglwImplExt.inl
@@ -6,10 +6,10 @@
 
 EGLint eglwClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
 {
-									const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLint)0;
-		return egl->clientWaitSyncKHR(dpy, sync, flags, timeout);
+	return egl->clientWaitSyncKHR(dpy, sync, flags, timeout);
 }
 
 EGLImageKHR eglwCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
@@ -38,7 +38,7 @@
 
 EGLSyncKHR eglwCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
 {
-												const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLSyncKHR)0;
 	return egl->createSyncKHR(dpy, type, attrib_list);
@@ -46,7 +46,7 @@
 
 EGLBoolean eglwDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image)
 {
-																	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLBoolean)0;
 	return egl->destroyImageKHR(dpy, image);
@@ -54,7 +54,7 @@
 
 EGLBoolean eglwDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync)
 {
-																		const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLBoolean)0;
 	return egl->destroySyncKHR(dpy, sync);
@@ -62,7 +62,7 @@
 
 EGLDisplay eglwGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list)
 {
-							const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLDisplay)0;
 	return egl->getPlatformDisplayEXT(platform, native_display, attrib_list);
@@ -70,7 +70,7 @@
 
 EGLBoolean eglwGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)
 {
-									const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLBoolean)0;
 	return egl->getSyncAttribKHR(dpy, sync, attribute, value);
@@ -78,7 +78,7 @@
 
 EGLBoolean eglwLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list)
 {
-										const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLBoolean)0;
 	return egl->lockSurfaceKHR(dpy, surface, attrib_list);
@@ -86,7 +86,7 @@
 
 EGLBoolean eglwSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects)
 {
-								const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLBoolean)0;
 	return egl->setDamageRegionKHR(dpy, surface, rects, n_rects);
@@ -94,7 +94,7 @@
 
 EGLBoolean eglwSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
 {
-														const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLBoolean)0;
 	return egl->signalSyncKHR(dpy, sync, mode);
@@ -102,7 +102,7 @@
 
 EGLBoolean eglwSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects)
 {
-							const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLBoolean)0;
 	return egl->swapBuffersWithDamageKHR(dpy, surface, rects, n_rects);
@@ -110,7 +110,7 @@
 
 EGLBoolean eglwUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface)
 {
-																const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLBoolean)0;
 	return egl->unlockSurfaceKHR(dpy, surface);
@@ -118,8 +118,8 @@
 
 EGLint eglwWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
 {
-																const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+	const eglw::Library* egl = eglw::getCurrentThreadLibrary();
 	if (!egl)
 		return (EGLint)0;
-		return egl->waitSyncKHR(dpy, sync, flags);
+	return egl->waitSyncKHR(dpy, sync, flags);
 }
diff --git a/modules/gles31/functional/es31fNegativeSSBOBlockTests.cpp b/modules/gles31/functional/es31fNegativeSSBOBlockTests.cpp
index bddd035..358b7a2 100644
--- a/modules/gles31/functional/es31fNegativeSSBOBlockTests.cpp
+++ b/modules/gles31/functional/es31fNegativeSSBOBlockTests.cpp
@@ -76,16 +76,7 @@
 	void			setSingleValue						(const SsboArgData argData);
 	bool			setAllValues						(const std::vector<SsboArgData> argDataList);
 
-	const std::string&	getContextVersion				(void) const;
-	const std::string&	getStdFormat					(void) const;
-	const std::string&	getBindingPoint					(void) const;
-	const std::string&	getMatrixOrder					(void) const;
-	const std::string&	getMemberType					(void) const;
-	const std::string&	getMemberName					(void) const;
-	const std::string&	getMemberFixedArrayName			(void) const;
-	const std::string&	getMemberVariableArray			(void) const;
 	bool				getMemberReorder				(void) const;
-	int					getNumberMembers				(void) const;
 
 	void				resetValues						(void);
 
@@ -177,56 +168,11 @@
 	return true;
 }
 
-const std::string& SsboArgs::getContextVersion (void) const
-{
-	return m_negativeContextVersion;
-}
-
-const std::string& SsboArgs::getStdFormat (void) const
-{
-	return m_stdFormat;
-}
-
-const std::string& SsboArgs::getBindingPoint (void) const
-{
-	return m_bindingPoint;
-}
-
-const std::string& SsboArgs::getMatrixOrder (void) const
-{
-	return m_matrixOrder;
-}
-
-const std::string& SsboArgs::getMemberType (void) const
-{
-	return m_memberType;
-}
-
-const std::string& SsboArgs::getMemberName (void) const
-{
-	return m_memberName;
-}
-
-const std::string& SsboArgs::getMemberFixedArrayName (void) const
-{
-	return m_memberFixedArrayerName;
-}
-
-const std::string& SsboArgs::getMemberVariableArray (void) const
-{
-	return m_memberVariableArray;
-}
-
 bool SsboArgs::getMemberReorder (void) const
 {
 	return m_memberReorder;
 }
 
-int SsboArgs::getNumberMembers (void) const
-{
-	return m_numberMembers;
-}
-
 void SsboArgs::resetValues (void)
 {
 	setDefaultValues();
diff --git a/modules/gles31/functional/es31fSRGBDecodeTests.cpp b/modules/gles31/functional/es31fSRGBDecodeTests.cpp
index d3f947f..114a624 100644
--- a/modules/gles31/functional/es31fSRGBDecodeTests.cpp
+++ b/modules/gles31/functional/es31fSRGBDecodeTests.cpp
@@ -311,11 +311,9 @@
 	void		setTextureUnit		(const deUint32 textureUnit);
 	void		setIsActive			(const bool isActive);
 
-	deUint32	getHandle			(void) const;
 	bool		getIsActive			(void) const;
 
 	void		bindToTexture		(void);
-	void		unbindFromTexture	(void);
 
 private:
 	const glw::Functions*		m_gl;
@@ -387,11 +385,6 @@
 	m_isActive = isActive;
 }
 
-deUint32 SRGBTestSampler::getHandle (void) const
-{
-	return m_samplerHandle;
-}
-
 bool SRGBTestSampler::getIsActive (void) const
 {
 	return m_isActive;
@@ -402,11 +395,6 @@
 	m_gl->bindSampler(m_textureUnit, m_samplerHandle);
 }
 
-void SRGBTestSampler::unbindFromTexture (void)
-{
-	m_gl->bindSampler(m_textureUnit, 0);
-}
-
 class SRGBTestTexture
 {
 public:
@@ -430,7 +418,6 @@
 	deUint32	getHandle			(void) const;
 	deUint32	getGLTargetType		(void) const;
 	SRGBDecode	getDecode			(void) const;
-	bool		getHasSampler		(void) const;
 
 	void		upload				(void);
 
@@ -565,11 +552,6 @@
 	return m_decoding;
 }
 
-bool SRGBTestTexture::getHasSampler (void) const
-{
-	return m_hasSampler;
-}
-
 void SRGBTestTexture::upload (void)
 {
 	m_source.upload();
@@ -604,14 +586,11 @@
 	void							setToggleRequired		(bool toggleRequired);
 	void							setUniformToggle		(int location, bool toggleDecodeValue);
 
-	int								getUniformTotal			(void) const;
 	const std::vector<UniformData>&	getUniformDataList		(void) const;
 	const UniformData&				getUniformAtLocation	(int location) const;
 	int								getUniformLocation		(const std::string& name);
 	deUint32						getHandle				(void) const;
 	bool							getBlendRequired		(void) const;
-	bool							getToggleRequired		(void) const;
-	const std::string&				getFragmentShader		(void) const;
 
 private:
 	std::string						genFunctionCall			(ShaderSamplingType samplingType, const int uniformIdx);
@@ -713,11 +692,6 @@
 	}
 }
 
-int SRGBTestProgram::getUniformTotal (void) const
-{
-	return (int)m_uniformDataList.size();
-}
-
 const std::vector<UniformData>& SRGBTestProgram::getUniformDataList (void) const
 {
 	return m_uniformDataList;
@@ -752,16 +726,6 @@
 	return m_blendRequired;
 }
 
-bool SRGBTestProgram::getToggleRequired (void) const
-{
-	return m_toggleRequired;
-}
-
-const std::string& SRGBTestProgram::getFragmentShader (void) const
-{
-	return m_shaderFragment;
-}
-
 std::string SRGBTestProgram::genFunctionCall (ShaderSamplingType samplingType, const int uniformIdx)
 {
 	std::ostringstream functionCall;
@@ -904,13 +868,8 @@
 
 	void					setSamplingGroup				(const ShaderSamplingGroup samplingGroup);
 	void					setSamplingLocations			(const int px, const int py);
-	void					setShaderProgramBlendRequired	(const int programIdx, const bool blend);
-	void					setShaderProgramToggleRequired	(const int programIdx, const bool toggle);
 	void					setUniformToggle				(const int programIdx, const std::string& uniformName, bool toggleDecode);
 
-	deUint32				getShaderProgramHandle			(const int programIdx) const;
-	deUint32				getTextureHandle				(const int textureIdx) const;
-
 	void					addTexture						(const glu::TextureTestUtil::TextureType	targetType,
 															 const int									width,
 															 const int									height,
@@ -1104,32 +1063,6 @@
 	m_py = py;
 }
 
-void SRGBTestCase::setShaderProgramBlendRequired (const int programIdx, const bool blend)
-{
-	m_shaderProgramList[programIdx]->setBlendRequired(blend);
-}
-
-void SRGBTestCase::setShaderProgramToggleRequired (const int programIdx, const bool toggle)
-{
-	m_shaderProgramList[programIdx]->setToggleRequired(toggle);
-}
-
-void SRGBTestCase::setUniformToggle (const int programIdx, const std::string& uniformName, bool toggleDecodeValue)
-{
-	int uniformLocation = m_shaderProgramList[programIdx]->getUniformLocation(uniformName);
-	m_shaderProgramList[programIdx]->setUniformToggle(uniformLocation, toggleDecodeValue);
-}
-
-deUint32 SRGBTestCase::getShaderProgramHandle (const int programIdx) const
-{
-	return m_shaderProgramList[programIdx]->getHandle();
-}
-
-deUint32 SRGBTestCase::getTextureHandle (const int textureIdx) const
-{
-	return m_textureSourceList[textureIdx]->getHandle();
-}
-
 void SRGBTestCase::addTexture (	const glu::TextureTestUtil::TextureType	targetType,
 								const int								width,
 								const int								height,
diff --git a/scripts/egl/gtf_wrapper.py b/scripts/egl/gtf_wrapper.py
index 182c878..379762b 100644
--- a/scripts/egl/gtf_wrapper.py
+++ b/scripts/egl/gtf_wrapper.py
@@ -96,5 +96,5 @@
 	writeInlFile(os.path.join(EGL_WRAPPER_DIR, "eglwApi.inl"), src)
 	writeInlFile(os.path.join(EGL_WRAPPER_DIR, "eglwEnumsC.inl"), indentLines(map(enumDefinitionC, defaultIface.enums)))
 	genCommandList(noExtIface, commandWrapperDefinition, EGL_WRAPPER_DIR, "eglwImpl.inl")
-	genCommandList(extOnlyIface, commandWrapperDefinition, EGL_WRAPPER_DIR, "eglwImplExt.inl", True)
+	genCommandList(extOnlyIface, commandWrapperDefinition, EGL_WRAPPER_DIR, "eglwImplExt.inl")