usage of deprecated ZSTD_resetDStream (replaced with its equivalent ZSTD_DCtx_reset(_ctx, ZSTD_reset_session_only);)
initialization order in constructor CArchiveUpdateCallback (doesn't match to members declaration order)
It'd silence two warnings, thus fixes errors in build with -Werror.
For instance build of 7za with gcc:
ZstdDecoder.cpp, [-Werror=deprecated-declarations]
```
../../Compress/ZstdDecoder.cpp: In member function 'HRESULT NCompress::NZSTD::CDecoder::CodeSpec(ISequentialInStream*, ISequentialOutStream*, ICompressProgressInfo*)':
../../Compress/ZstdDecoder.cpp:84:22: error: 'size_t ZSTD_resetDStream(ZSTD_DStream*)' is deprecated: use ZSTD_DCtx_reset, see zstd.h for detailed instructions [-Werror=deprecated-declarations]
84 | ZSTD_resetDStream(_ctx);
| ~~~~~~~~~~~~~~~~~^~~~~~
In file included from ../../Compress/ZstdDecoder.h:5,
from ../../Compress/ZstdDecoder.cpp:4:
C:/Projects/7-Zip-Ex/C/zstd/zstd.h:2603:27: note: declared here
2603 | ZSTDLIB_STATIC_API size_t ZSTD_resetDStream(ZSTD_DStream* zds);
| ^~~~~~~~~~~~~~~~~
../../Compress/ZstdDecoder.cpp:139:35: error: 'size_t ZSTD_resetDStream(ZSTD_DStream*)' is deprecated: use ZSTD_DCtx_reset, see zstd.h for detailed instructions [-Werror=deprecated-declarations]
139 | result = ZSTD_resetDStream(_ctx);
| ~~~~~~~~~~~~~~~~~^~~~~~
C:/Projects/7-Zip-Ex/C/zstd/zstd.h:2603:27: note: declared here
2603 | ZSTDLIB_STATIC_API size_t ZSTD_resetDStream(ZSTD_DStream* zds);
| ^~~~~~~~~~~~~~~~~
cc1plus.exe: all warnings being treated as errors
```
UpdateCallback.cpp, [-Werror=reorder]
```
In file included from ../../UI/Common/UpdateCallback.cpp:36:
../../UI/Common/UpdateCallback.h: In constructor 'CArchiveUpdateCallback::CArchiveUpdateCallback()':
../../UI/Common/UpdateCallback.h:178:9: error: 'CArchiveUpdateCallback::ProcessedItemsStatuses' will be initialized after [-Werror=reorder]
178 | Byte *ProcessedItemsStatuses;
| ^~~~~~~~~~~~~~~~~~~~~~
../../UI/Common/UpdateCallback.h:140:8: error: 'bool CArchiveUpdateCallback::VolNumberAfterExt' [-Werror=reorder]
140 | bool VolNumberAfterExt;
| ^~~~~~~~~~~~~~~~~
../../UI/Common/UpdateCallback.cpp:58:1: error: when initialized here [-Werror=reorder]
58 | CArchiveUpdateCallback::CArchiveUpdateCallback():
| ^~~~~~~~~~~~~~~~~~~~~~
cc1plus.exe: all warnings being treated as errors
```
This PR resolves:
ZSTD_resetDStream
(replaced with its equivalentZSTD_DCtx_reset(_ctx, ZSTD_reset_session_only);
)CArchiveUpdateCallback
(doesn't match to members declaration order)It'd silence two warnings, thus fixes errors in build with
-Werror
. For instance build of 7za with gcc:ZstdDecoder.cpp, [-Werror=deprecated-declarations]
``` ../../Compress/ZstdDecoder.cpp: In member function 'HRESULT NCompress::NZSTD::CDecoder::CodeSpec(ISequentialInStream*, ISequentialOutStream*, ICompressProgressInfo*)': ../../Compress/ZstdDecoder.cpp:84:22: error: 'size_t ZSTD_resetDStream(ZSTD_DStream*)' is deprecated: use ZSTD_DCtx_reset, see zstd.h for detailed instructions [-Werror=deprecated-declarations] 84 | ZSTD_resetDStream(_ctx); | ~~~~~~~~~~~~~~~~~^~~~~~ In file included from ../../Compress/ZstdDecoder.h:5, from ../../Compress/ZstdDecoder.cpp:4: C:/Projects/7-Zip-Ex/C/zstd/zstd.h:2603:27: note: declared here 2603 | ZSTDLIB_STATIC_API size_t ZSTD_resetDStream(ZSTD_DStream* zds); | ^~~~~~~~~~~~~~~~~ ../../Compress/ZstdDecoder.cpp:139:35: error: 'size_t ZSTD_resetDStream(ZSTD_DStream*)' is deprecated: use ZSTD_DCtx_reset, see zstd.h for detailed instructions [-Werror=deprecated-declarations] 139 | result = ZSTD_resetDStream(_ctx); | ~~~~~~~~~~~~~~~~~^~~~~~ C:/Projects/7-Zip-Ex/C/zstd/zstd.h:2603:27: note: declared here 2603 | ZSTDLIB_STATIC_API size_t ZSTD_resetDStream(ZSTD_DStream* zds); | ^~~~~~~~~~~~~~~~~ cc1plus.exe: all warnings being treated as errors ```UpdateCallback.cpp, [-Werror=reorder]
``` In file included from ../../UI/Common/UpdateCallback.cpp:36: ../../UI/Common/UpdateCallback.h: In constructor 'CArchiveUpdateCallback::CArchiveUpdateCallback()': ../../UI/Common/UpdateCallback.h:178:9: error: 'CArchiveUpdateCallback::ProcessedItemsStatuses' will be initialized after [-Werror=reorder] 178 | Byte *ProcessedItemsStatuses; | ^~~~~~~~~~~~~~~~~~~~~~ ../../UI/Common/UpdateCallback.h:140:8: error: 'bool CArchiveUpdateCallback::VolNumberAfterExt' [-Werror=reorder] 140 | bool VolNumberAfterExt; | ^~~~~~~~~~~~~~~~~ ../../UI/Common/UpdateCallback.cpp:58:1: error: when initialized here [-Werror=reorder] 58 | CArchiveUpdateCallback::CArchiveUpdateCallback(): | ^~~~~~~~~~~~~~~~~~~~~~ cc1plus.exe: all warnings being treated as errors ```