Fix #800 (mostly): set of Linux warnings.

This commit is contained in:
John Kessenich 2017-03-28 09:52:38 -06:00
parent 9fb31ce8ec
commit aa3c64c214
7 changed files with 11 additions and 12 deletions

View File

@ -2777,7 +2777,7 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
if (paramType.containsOpaque() || // sampler, etc. if (paramType.containsOpaque() || // sampler, etc.
(paramType.getBasicType() == glslang::EbtBlock && (paramType.getBasicType() == glslang::EbtBlock &&
paramType.getQualifier().storage == glslang::EvqBuffer) || // SSBO paramType.getQualifier().storage == glslang::EvqBuffer) || // SSBO
p == 0 && implicitThis) // implicit 'this' (p == 0 && implicitThis)) // implicit 'this'
typeId = builder.makePointer(TranslateStorageClass(paramType), typeId); typeId = builder.makePointer(TranslateStorageClass(paramType), typeId);
else if (paramType.getQualifier().storage != glslang::EvqConstReadOnly) else if (paramType.getQualifier().storage != glslang::EvqConstReadOnly)
typeId = builder.makePointer(spv::StorageClassFunction, typeId); typeId = builder.makePointer(spv::StorageClassFunction, typeId);

View File

@ -3,4 +3,4 @@
// For the date, it uses the current date (when then script is run). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1937" #define GLSLANG_REVISION "Overload400-PrecQual.1937"
#define GLSLANG_DATE "24-Mar-2017" #define GLSLANG_DATE "28-Mar-2017"

View File

@ -5770,7 +5770,7 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q
} }
// Do all block-declaration checking regarding its qualifiers. // Do all block-declaration checking regarding its qualifiers.
void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier, bool instanceName) void TParseContext::blockQualifierCheck(const TSourceLoc& loc, const TQualifier& qualifier, bool /*instanceName*/)
{ {
// The 4.5 specification says: // The 4.5 specification says:
// //

View File

@ -174,7 +174,7 @@ protected:
int firstNewMember; // the index of the first member not yet inserted into the symbol table int firstNewMember; // the index of the first member not yet inserted into the symbol table
// override this to set the language-specific name // override this to set the language-specific name
virtual const char* getGlobalUniformBlockName() const { return ""; } virtual const char* getGlobalUniformBlockName() const { return ""; }
virtual void setUniformBlockDefaults(TType& block) const { } virtual void setUniformBlockDefaults(TType&) const { }
virtual void finalizeGlobalUniformBlockLayout(TVariable&) { } virtual void finalizeGlobalUniformBlockLayout(TVariable&) { }
virtual void outputMessage(const TSourceLoc&, const char* szReason, const char* szToken, virtual void outputMessage(const TSourceLoc&, const char* szReason, const char* szToken,
const char* szExtraInfoFormat, TPrefixType prefix, const char* szExtraInfoFormat, TPrefixType prefix,

View File

@ -445,19 +445,19 @@ struct TDefaultIoResolver : public glslang::TIoMapResolver
return 0; return 0;
} }
bool validateInOut(EShLanguage stage, const char* name, const TType& type, bool is_live) override bool validateInOut(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override
{ {
return true; return true;
} }
int resolveInOutLocation(EShLanguage stage, const char* name, const TType& type, bool is_live) override int resolveInOutLocation(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override
{ {
return -1; return -1;
} }
int resolveInOutComponent(EShLanguage stage, const char* name, const TType& type, bool is_live) override int resolveInOutComponent(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override
{ {
return -1; return -1;
} }
int resolveInOutIndex(EShLanguage stage, const char* name, const TType& type, bool is_live) override int resolveInOutIndex(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override
{ {
return -1; return -1;
} }

View File

@ -1829,7 +1829,7 @@ bool HlslGrammar::acceptStruct(TType& type, TIntermNode*& nodeList)
TVector<TFunctionDeclarator> functionDeclarators; TVector<TFunctionDeclarator> functionDeclarators;
parseContext.pushNamespace(structName); parseContext.pushNamespace(structName);
bool acceptedList = acceptStructDeclarationList(typeList, nodeList, structName, functionDeclarators); bool acceptedList = acceptStructDeclarationList(typeList, nodeList, functionDeclarators);
parseContext.popNamespace(); parseContext.popNamespace();
if (! acceptedList) { if (! acceptedList) {
@ -1988,7 +1988,7 @@ bool HlslGrammar::acceptStructBufferType(TType& type)
// | IDENTIFIER array_specifier post_decls // | IDENTIFIER array_specifier post_decls
// | IDENTIFIER function_parameters post_decls // member-function prototype // | IDENTIFIER function_parameters post_decls // member-function prototype
// //
bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList, TIntermNode*& nodeList, const TString& typeName, bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList, TIntermNode*& nodeList,
TVector<TFunctionDeclarator>& declarators) TVector<TFunctionDeclarator>& declarators)
{ {
typeList = new TTypeList(); typeList = new TTypeList();

View File

@ -87,8 +87,7 @@ namespace glslang {
bool acceptTextureType(TType&); bool acceptTextureType(TType&);
bool acceptStructBufferType(TType&); bool acceptStructBufferType(TType&);
bool acceptStruct(TType&, TIntermNode*& nodeList); bool acceptStruct(TType&, TIntermNode*& nodeList);
bool acceptStructDeclarationList(TTypeList*&, TIntermNode*& nodeList, const TString& typeName, bool acceptStructDeclarationList(TTypeList*&, TIntermNode*& nodeList, TVector<TFunctionDeclarator>&);
TVector<TFunctionDeclarator>&);
bool acceptMemberFunctionDefinition(TIntermNode*& nodeList, const TType&, const TString& memberName, bool acceptMemberFunctionDefinition(TIntermNode*& nodeList, const TType&, const TString& memberName,
TFunctionDeclarator&); TFunctionDeclarator&);
bool acceptFunctionParameters(TFunction&); bool acceptFunctionParameters(TFunction&);