From d855dafe587ca1be44c729859818d077fb29972f Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 14 Aug 2004 17:35:05 +0000 Subject: [PATCH] fixed build warnings (including bug report #1005303 ) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3628 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h | 2 +- Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h | 2 ++ Source/7zip/7zip/Compress/LZ/LZInWindow.h | 2 +- Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h | 1 + Source/exehead/util.c | 2 +- Source/zlib/INFBLOCK.C | 4 ++-- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h index 67acb025..f9c079f4 100644 --- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h +++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTree.h @@ -96,7 +96,7 @@ class CInTree: public CLZInWindow public: CInTree(); - ~CInTree(); + virtual ~CInTree(); HRESULT Create(UINT32 sizeHistory, UINT32 keepAddBufferBefore, UINT32 matchMaxLen, UINT32 keepAddBufferAfter, UINT32 sizeReserv = (1<<17)); HRESULT Init(ISequentialInStream *stream); diff --git a/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h b/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h index 9903db4f..5b3f1328 100644 --- a/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h +++ b/Source/7zip/7zip/Compress/LZ/BinTree/BinTreeMF.h @@ -62,6 +62,7 @@ class CInTree2: public CInTree virtual void BeforeMoveBlock(); virtual void AfterMoveBlock(); public: + virtual ~CInTree2() {} void SetCallback(IMatchFinderCallback *callback) { _callback = callback; @@ -102,6 +103,7 @@ public: void SetWindowReservSize(UINT32 reservWindowSize) { m_WindowReservSize = reservWindowSize; } */ + virtual ~CMatchFinderBinTree() {} }; } diff --git a/Source/7zip/7zip/Compress/LZ/LZInWindow.h b/Source/7zip/7zip/Compress/LZ/LZInWindow.h index 6ae2da16..089f0f7a 100644 --- a/Source/7zip/7zip/Compress/LZ/LZInWindow.h +++ b/Source/7zip/7zip/Compress/LZ/LZInWindow.h @@ -30,7 +30,7 @@ protected: void Free(); public: CLZInWindow(): _bufferBase(0) {} - ~CLZInWindow(); + virtual ~CLZInWindow(); void Create(UINT32 keepSizeBefore, UINT32 keepSizeAfter, UINT32 keepSizeReserv = (1<<17)); diff --git a/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h b/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h index 9580d740..3ef78546 100644 --- a/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h +++ b/Source/7zip/7zip/Compress/LZMA/LZMAEncoder.h @@ -249,6 +249,7 @@ private: public: CEncoder(); + virtual ~CEncoder() {} void SetWriteEndMarkerMode(bool writeEndMarker) { _writeEndMark= writeEndMarker; } diff --git a/Source/exehead/util.c b/Source/exehead/util.c index 77402098..2006921b 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -132,7 +132,7 @@ void NSISCALL myDelete(char *buf, int flags) if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { #ifdef NSIS_SUPPORT_RMDIR - if ((flags & DEL_DIR | DEL_RECURSE) == (DEL_DIR | DEL_RECURSE)) + if ((flags & (DEL_DIR | DEL_RECURSE)) == (DEL_DIR | DEL_RECURSE)) { myDelete(buf,flags); } diff --git a/Source/zlib/INFBLOCK.C b/Source/zlib/INFBLOCK.C index 7a6a598e..7ffd009a 100644 --- a/Source/zlib/INFBLOCK.C +++ b/Source/zlib/INFBLOCK.C @@ -447,11 +447,11 @@ int ZEXPORT inflate(z_streamp z) while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10)) { NEEDBITS(3) - s->sub.trees.t_blens[border[s->sub.trees.index++]] = (uInt)b & 7; + s->sub.trees.t_blens[(int)border[s->sub.trees.index++]] = (uInt)b & 7; DUMPBITS(3) } while (s->sub.trees.index < 19) - s->sub.trees.t_blens[border[s->sub.trees.index++]] = 0; + s->sub.trees.t_blens[(int)border[s->sub.trees.index++]] = 0; s->sub.trees.bb = 7; {