Skip to content

Commit

Permalink
Cleanup warnings for clang -Wall
Browse files Browse the repository at this point in the history
Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
  • Loading branch information
kdt3rd committed Jul 23, 2019
1 parent c1501ec commit a5fbf7d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
2 changes: 2 additions & 0 deletions OpenEXR/IlmImf/ImfB44Compressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ B44Compressor::B44Compressor
_channels (hdr.channels()),
_channelData (0)
{
// TODO: Remove this when we can change the ABI
(void)_maxScanLineSize;
//
// Allocate buffers for compressed an uncompressed pixel data,
// allocate a set of ChannelData structs to help speed up the
Expand Down
5 changes: 3 additions & 2 deletions OpenEXR/IlmImf/ImfPizCompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ PizCompressor::PizCompressor
_channels (hdr.channels()),
_channelData (0)
{
size_t tmpBufferSize =
uiMult (maxScanLineSize, numScanLines) / 2;
// TODO: Remove this when we can change the ABI
(void) _maxScanLineSize;
size_t tmpBufferSize = uiMult (maxScanLineSize, numScanLines) / 2;

size_t outBufferSize =
uiAdd (uiMult (maxScanLineSize, numScanLines),
Expand Down
5 changes: 3 additions & 2 deletions OpenEXR/IlmImf/ImfZipCompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ ZipCompressor::ZipCompressor
_outBuffer (0),
_zip(maxScanLineSize, numScanLines)
{
_outBuffer = new char[_zip.maxCompressedSize()];
// TODO: Remove this when we can change the ABI
(void) _maxScanLineSize;
_outBuffer = new char[_zip.maxCompressedSize ()];
}


Expand Down Expand Up @@ -124,4 +126,3 @@ ZipCompressor::uncompress (const char *inPtr,


OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT

2 changes: 1 addition & 1 deletion OpenEXR/IlmImfTest/testBadTypeAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ template<class T> void readTiledThing(T & input,bool test)
case NUM_LEVELMODES:
default:
std::cerr << "Invalid tile mode " << int(t.mode) << std::endl;
x_levels = y_levels = 0;
break;
}

Expand Down Expand Up @@ -409,4 +410,3 @@ void testBadTypeAttributes(const std::string & tempDir)

cout << "ok\n" << endl;
}

4 changes: 2 additions & 2 deletions OpenEXR/IlmImfTest/testCopyDeepScanLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const int minX = 42;
const int minY = 51;
const Box2i dataWindow(V2i(minX, minY), V2i(minX + width - 1, minY + height - 1));
const Box2i displayWindow(V2i(0, 0), V2i(minX + width * 2, minY + height * 2));
const char source_filename[] = IMF_TMP_DIR "imf_test_copy_deep_scanline_source.exr";
const char copy_filename[] = IMF_TMP_DIR "imf_test_copy_deep_scanline_copy.exr";
//const char source_filename[] = IMF_TMP_DIR "imf_test_copy_deep_scanline_source.exr";
//const char copy_filename[] = IMF_TMP_DIR "imf_test_copy_deep_scanline_copy.exr";

vector<int> channelTypes;
Array2D<unsigned int> sampleCount;
Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImfTest/testDeepScanLineMultipleRead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

namespace{

const char source_filename[] = IMF_TMP_DIR "imf_test_multiple_read.exr";
//const char source_filename[] = IMF_TMP_DIR "imf_test_multiple_read.exr";

using std::cout;
using std::endl;
Expand Down
7 changes: 7 additions & 0 deletions PyIlmBase/PyImath/PyImathFixedMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
#include "PyImathFixedArray.h"
#include "PyImathOperators.h"

#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
#endif
namespace PyImath {

//
Expand Down Expand Up @@ -540,5 +544,8 @@ static void add_bitwise_math_functions(boost::python::class_<FixedMatrix<T> > &c


}
#ifdef __clang__
# pragma clang diagnostic pop
#endif

#endif
5 changes: 1 addition & 4 deletions PyIlmBase/PyImath/PyImathLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ intersect2(Line3<T> &line, const Vec3<T> &v0, const Vec3<T> &v1, const Vec3<T> &

if(IMATH_NAMESPACE::intersect(line, v0, v1, v2, pt, bar, front))
{
tuple t = make_tuple(pt, bar, front);
return t;
return make_tuple (pt, bar, front);
}
else
{
Expand Down Expand Up @@ -591,5 +590,3 @@ template PYIMATH_EXPORT class_<Line3<float> > register_Line<float>();
template PYIMATH_EXPORT class_<Line3<double> > register_Line<double>();

} // namespace PyImath


0 comments on commit a5fbf7d

Please sign in to comment.