From 4abb560cf7fd8afc528986c8ba86308524a1534c Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Fri, 21 Oct 2016 19:20:32 +0000 Subject: [PATCH] #1243. Fixing compilation warnings from clang in jp2image.cpp --- src/jp2image.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jp2image.cpp b/src/jp2image.cpp index 72277fa9..40d28d55 100644 --- a/src/jp2image.cpp +++ b/src/jp2image.cpp @@ -598,12 +598,13 @@ namespace Exiv2 } // Jp2Image::writeMetadata +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wcast-align" void Jp2Image::encodeJp2Header(const DataBuf& boxBuf,DataBuf& outBuf) { DataBuf output(boxBuf.size_ + iccProfile_.size_ + 100); // allocate sufficient space int outlen = sizeof(Jp2BoxHeader) ; // now many bytes have we written to output? int inlen = sizeof(Jp2BoxHeader) ; // how many bytes have we read from boxBuf? - Jp2BoxHeader* pBox = (Jp2BoxHeader*) boxBuf.pData_; int32_t length = getLong((byte*)&pBox->length, bigEndian); int32_t count = sizeof (Jp2BoxHeader); @@ -667,6 +668,7 @@ namespace Exiv2 ul2Data((byte*)&pBox->type,kJp2BoxTypeJp2Header,bigEndian); ul2Data((byte*)&pBox->length,outlen,bigEndian); } // Jp2Image::encodeJp2Header +# pragma clang diagnostic pop void Jp2Image::doWriteMetadata(BasicIo& outIo) {