Compile fixes for gcc -Wall

This commit is contained in:
baldurk 2015-08-05 20:54:58 +02:00
parent 0718e45c24
commit d7c5ead6a1
12 changed files with 27 additions and 24 deletions

View file

@ -3530,13 +3530,13 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
// the implementation-dependent constant gl_MaxTransformFeedbackBuffers."
if (value >= resources.maxTransformFeedbackBuffers)
error(loc, "buffer is too large:", id.c_str(), "gl_MaxTransformFeedbackBuffers is %d", resources.maxTransformFeedbackBuffers);
if (value >= TQualifier::layoutXfbBufferEnd)
if (value >= (int)TQualifier::layoutXfbBufferEnd)
error(loc, "buffer is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbBufferEnd-1);
else
publicType.qualifier.layoutXfbBuffer = value;
return;
} else if (id == "xfb_offset") {
if (value >= TQualifier::layoutXfbOffsetEnd)
if (value >= (int)TQualifier::layoutXfbOffsetEnd)
error(loc, "offset is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbOffsetEnd-1);
else
publicType.qualifier.layoutXfbOffset = value;
@ -3546,9 +3546,9 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
// implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents."
if (value > 4 * resources.maxTransformFeedbackInterleavedComponents)
error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", resources.maxTransformFeedbackInterleavedComponents);
else if (value >= TQualifier::layoutXfbStrideEnd)
else if (value >= (int)TQualifier::layoutXfbStrideEnd)
error(loc, "stride is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbStrideEnd-1);
if (value < TQualifier::layoutXfbStrideEnd)
if (value < (int)TQualifier::layoutXfbStrideEnd)
publicType.qualifier.layoutXfbStride = value;
return;
}
@ -4927,7 +4927,7 @@ void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifi
TQualifier& memberQualifier = typeList[member].type->getQualifier();
const TSourceLoc& memberLoc = typeList[member].loc;
if (! memberQualifier.hasLocation()) {
if (nextLocation >= TQualifier::layoutLocationEnd)
if (nextLocation >= (int)TQualifier::layoutLocationEnd)
error(memberLoc, "location is too large", "location", "");
memberQualifier.layoutLocation = nextLocation;
memberQualifier.layoutComponent = 0;