From 2baa774259830680452d5a6fe8090121f7899a81 Mon Sep 17 00:00:00 2001 From: LoopDawg Date: Thu, 31 Aug 2017 13:44:34 -0600 Subject: [PATCH] Linux build warning fix * Remove complaint about unused function parameter in resolveUniformLocation() * Remove complaint about defined but not used variable in spvIR.h --- SPIRV/spvIR.h | 8 ++++++++ glslang/MachineIndependent/iomapper.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 087a53f..6880595 100755 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -65,6 +65,14 @@ const Id NoResult = 0; const Id NoType = 0; const Decoration NoPrecision = DecorationMax; + +#ifdef __GNUC__ +# define POTENTIALLY_UNUSED __attribute__((unused)) +#else +# define POTENTIALLY_UNUSED +#endif + +POTENTIALLY_UNUSED const MemorySemanticsMask MemorySemanticsAllMemory = (MemorySemanticsMask)(MemorySemanticsSequentiallyConsistentMask | MemorySemanticsUniformMemoryMask | diff --git a/glslang/MachineIndependent/iomapper.cpp b/glslang/MachineIndependent/iomapper.cpp index 59db1ad..1758d00 100644 --- a/glslang/MachineIndependent/iomapper.cpp +++ b/glslang/MachineIndependent/iomapper.cpp @@ -416,7 +416,7 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver return 0; } - int resolveUniformLocation(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool is_live) override + int resolveUniformLocation(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool /*is_live*/) override { // kick out of not doing this if (!doAutoLocationMapping) -- 2.7.4