From 7afa717e61ab41bfd6f889f5ce4a449e30c5c3fd Mon Sep 17 00:00:00 2001 From: Pal Mezei Date: Tue, 7 Mar 2017 17:05:04 +1100 Subject: [PATCH] Fixing various gcc warnings. --- pxr/imaging/lib/hdx/unitTestGLDrawing.cpp | 4 ---- pxr/usdImaging/lib/usdImaging/delegate.cpp | 2 +- pxr/usdImaging/lib/usdImaging/pointInstancerAdapter.cpp | 2 +- third_party/katana/lib/usdKatana/readPointInstancer.cpp | 8 ++++---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/pxr/imaging/lib/hdx/unitTestGLDrawing.cpp b/pxr/imaging/lib/hdx/unitTestGLDrawing.cpp index 856aa95992..2a9f35535c 100644 --- a/pxr/imaging/lib/hdx/unitTestGLDrawing.cpp +++ b/pxr/imaging/lib/hdx/unitTestGLDrawing.cpp @@ -238,13 +238,9 @@ void Hdx_UnitTestGLDrawing::RunTest(int argc, char *argv[]) { bool offscreen = false; - bool animate = false; for (int i=0; i(instrData.dirtyBits) != HdChangeTracker::AllDirty) return instrData.dirtyBits; instrData.dirtyBits = HdChangeTracker::Clean; diff --git a/third_party/katana/lib/usdKatana/readPointInstancer.cpp b/third_party/katana/lib/usdKatana/readPointInstancer.cpp index acf933419f..21e272b6eb 100644 --- a/third_party/katana/lib/usdKatana/readPointInstancer.cpp +++ b/third_party/katana/lib/usdKatana/readPointInstancer.cpp @@ -222,7 +222,7 @@ namespace for (size_t i = 0; i < protoIndices.size(); ++i) { int index = protoIndices[i]; - if (index < 0 || index >= prototypePaths.size()) + if (index < 0 || static_cast(index) >= prototypePaths.size()) { outputIndices.push_back(-1); } @@ -643,7 +643,7 @@ PxrUsdKatanaReadPointInstancer( { int index = protoIndices[i]; - if (index < 0 || index >= prototypePaths.size()) + if (index < 0 || static_cast(index) >= prototypePaths.size()) { _LogAndSetError(attrs, TfStringPrintf( "ERROR: prototype index %i out of range", index)); @@ -771,7 +771,7 @@ PxrUsdKatanaReadPointInstancer( { int boundIndex = prototypeBoundIndices[i]; - if (boundIndex >= 0 && boundIndex < prototypeBounds.size()) + if (boundIndex >= 0 && static_cast(boundIndex) < prototypeBounds.size()) { // Get this instance's bounds in parent-local coords // @@ -780,7 +780,7 @@ PxrUsdKatanaReadPointInstancer( // Transform bounds into parent-local coords (at all time // samples). // - for (int timeSample = 0; timeSample < xformSampleTimes.size(); + for (size_t timeSample = 0; timeSample < xformSampleTimes.size(); ++timeSample) { GfMatrix4d matrix =