#1243. Fixing compilation warnings from clang in jp2image.cpp

v0.27.3
Robin Mills 9 years ago
parent dd39d165e2
commit 4abb560cf7

@ -598,12 +598,13 @@ namespace Exiv2
} // Jp2Image::writeMetadata } // Jp2Image::writeMetadata
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcast-align"
void Jp2Image::encodeJp2Header(const DataBuf& boxBuf,DataBuf& outBuf) void Jp2Image::encodeJp2Header(const DataBuf& boxBuf,DataBuf& outBuf)
{ {
DataBuf output(boxBuf.size_ + iccProfile_.size_ + 100); // allocate sufficient space DataBuf output(boxBuf.size_ + iccProfile_.size_ + 100); // allocate sufficient space
int outlen = sizeof(Jp2BoxHeader) ; // now many bytes have we written to output? int outlen = sizeof(Jp2BoxHeader) ; // now many bytes have we written to output?
int inlen = sizeof(Jp2BoxHeader) ; // how many bytes have we read from boxBuf? int inlen = sizeof(Jp2BoxHeader) ; // how many bytes have we read from boxBuf?
Jp2BoxHeader* pBox = (Jp2BoxHeader*) boxBuf.pData_; Jp2BoxHeader* pBox = (Jp2BoxHeader*) boxBuf.pData_;
int32_t length = getLong((byte*)&pBox->length, bigEndian); int32_t length = getLong((byte*)&pBox->length, bigEndian);
int32_t count = sizeof (Jp2BoxHeader); int32_t count = sizeof (Jp2BoxHeader);
@ -667,6 +668,7 @@ namespace Exiv2
ul2Data((byte*)&pBox->type,kJp2BoxTypeJp2Header,bigEndian); ul2Data((byte*)&pBox->type,kJp2BoxTypeJp2Header,bigEndian);
ul2Data((byte*)&pBox->length,outlen,bigEndian); ul2Data((byte*)&pBox->length,outlen,bigEndian);
} // Jp2Image::encodeJp2Header } // Jp2Image::encodeJp2Header
# pragma clang diagnostic pop
void Jp2Image::doWriteMetadata(BasicIo& outIo) void Jp2Image::doWriteMetadata(BasicIo& outIo)
{ {

Loading…
Cancel
Save