Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IlmImf: Fix clang compiler warnings #770

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfDeepTiledInputFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ TileBufferTask::execute ()
// sanity check data size: the uncompressed data should be exactly
// 'sizeOfTile' (if it's less, the file is corrupt and there'll be a buffer overrun)
//
if(_tileBuffer->dataSize != sizeOfTile)
if(_tileBuffer->dataSize != Int64(sizeOfTile))
arkellr marked this conversation as resolved.
Show resolved Hide resolved
{
THROW (IEX_NAMESPACE::InputExc, "size mismatch when reading deep tile: expected " << sizeOfTile << "bytes of uncompressed data but got " << _tileBuffer->dataSize);
}
Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfDwaCompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2820,7 +2820,7 @@ DwaCompressor::uncompress
//
// sanity check for buffer data lying within range
//
if (cd->planarUncBufferEnd + dstScanlineSize - _planarUncBuffer[UNKNOWN] > _planarUncBufferSize[UNKNOWN] )
if (cd->planarUncBufferEnd + (size_t) dstScanlineSize > _planarUncBuffer[UNKNOWN] + _planarUncBufferSize[UNKNOWN] )
arkellr marked this conversation as resolved.
Show resolved Hide resolved
{
throw Iex::InputExc("DWA data corrupt");
}
Expand Down
3 changes: 1 addition & 2 deletions OpenEXR/IlmImf/ImfMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1882,8 +1882,7 @@ getScanlineChunkOffsetTableSize(const Header& header)
const Box2i &dataWindow = header.dataWindow();

vector<size_t> bytesPerLine;
size_t maxBytesPerLine = bytesPerLineTable (header,
bytesPerLine);
(void) bytesPerLineTable (header, bytesPerLine);
arkellr marked this conversation as resolved.
Show resolved Hide resolved

int linesInBuffer = numLinesInBuffer ( header.compression() );

Expand Down
2 changes: 1 addition & 1 deletion OpenEXR/IlmImf/ImfOpaqueAttribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class OpaqueAttribute: public Attribute
virtual void copyValueFrom (const Attribute &other);


const int dataSize() const { return _dataSize; }
int dataSize() const { return _dataSize; }
const Array<char>& data() const { return _data; }

private:
Expand Down