From af25b8335628e3c0d50e76d155e2a61a0d118ff8 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Tue, 29 Jan 2013 17:37:20 -0500 Subject: [PATCH] Fix some more compiler warnings. --- BPTCEncoder/src/BC7Compressor.cpp | 2 +- BPTCEncoder/src/BitStream.h | 2 -- IO/src/FileStreamUnix.cpp | 2 +- IO/src/ImageWriterPNG.cpp | 1 - IO/src/ImageWriterPNG.h | 1 - 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/BPTCEncoder/src/BC7Compressor.cpp b/BPTCEncoder/src/BC7Compressor.cpp index 8456aab..b96d5cc 100755 --- a/BPTCEncoder/src/BC7Compressor.cpp +++ b/BPTCEncoder/src/BC7Compressor.cpp @@ -1158,7 +1158,7 @@ double BC7CompressionMode::Compress(BitStream &stream, const int shapeIdx, const double totalErr = 0.0; for(int cidx = 0; cidx < nSubsets; cidx++) { - int indices[kMaxNumDataPoints]; + int indices[kMaxNumDataPoints] = {0}; if(m_Attributes->hasRotation) { diff --git a/BPTCEncoder/src/BitStream.h b/BPTCEncoder/src/BitStream.h index d0cabd1..d502ef3 100755 --- a/BPTCEncoder/src/BitStream.h +++ b/BPTCEncoder/src/BitStream.h @@ -71,7 +71,6 @@ class BitStream { BitStream(unsigned char *ptr, int nBits, int start_offset) : m_BitsWritten(0), m_NumBits(nBits), - m_NumBytes((nBits + start_offset + 7) >> 3), m_CurByte(ptr), m_NextBit(start_offset % 8), done(false) @@ -116,7 +115,6 @@ class BitStream { int m_BitsWritten; const int m_NumBits; - const int m_NumBytes; unsigned char *m_CurByte; int m_NextBit; diff --git a/IO/src/FileStreamUnix.cpp b/IO/src/FileStreamUnix.cpp index da9e40b..0124050 100644 --- a/IO/src/FileStreamUnix.cpp +++ b/IO/src/FileStreamUnix.cpp @@ -202,7 +202,7 @@ int32 FileStream::Write(const uint8 *buf, uint32 bufSz) { return amtWritten; } -int64 FileStream::Tell() { +int32 FileStream::Tell() { FILE *fp = m_Impl->GetFilePtr(); if(NULL == fp) { return -1; diff --git a/IO/src/ImageWriterPNG.cpp b/IO/src/ImageWriterPNG.cpp index c61fa57..8ada946 100644 --- a/IO/src/ImageWriterPNG.cpp +++ b/IO/src/ImageWriterPNG.cpp @@ -87,7 +87,6 @@ public: ImageWriterPNG::ImageWriterPNG(const Image &im) : ImageWriter(im.GetWidth(), im.GetHeight(), im.RawData()) , m_StreamPosition(0) - , m_TotalBytesWritten(0) { } diff --git a/IO/src/ImageWriterPNG.h b/IO/src/ImageWriterPNG.h index 7899817..90b99e0 100644 --- a/IO/src/ImageWriterPNG.h +++ b/IO/src/ImageWriterPNG.h @@ -56,7 +56,6 @@ class ImageWriterPNG : public ImageWriter { virtual bool WriteImage(); private: uint32 m_StreamPosition; - uint32 m_TotalBytesWritten; friend class PNGStreamWriter; };