Linux build warning fix
authorLoopDawg <sk_opengl@khasekhemwy.net>
Thu, 31 Aug 2017 19:44:34 +0000 (13:44 -0600)
committerLoopDawg <sk_opengl@khasekhemwy.net>
Fri, 1 Sep 2017 00:09:58 +0000 (18:09 -0600)
* Remove complaint about unused function parameter in resolveUniformLocation()
* Remove complaint about defined but not used variable in spvIR.h

SPIRV/spvIR.h
glslang/MachineIndependent/iomapper.cpp

index 087a53f2696af34e5061f907bf799292d52e9a62..6880595e9f6bf51984aa12deef33aba02c09b6c4 100755 (executable)
@@ -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 |
index 59db1adeef706deec1f26c1200df484033b8fd9d..1758d00a8aacc8a6d93d34703cbb1796fa890a33 100644 (file)
@@ -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)