531-debloat_lzma.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. --- a/include/linux/lzma/LzmaDec.h
  2. +++ b/include/linux/lzma/LzmaDec.h
  3. @@ -31,14 +31,6 @@ typedef struct _CLzmaProps
  4. UInt32 dicSize;
  5. } CLzmaProps;
  6. -/* LzmaProps_Decode - decodes properties
  7. -Returns:
  8. - SZ_OK
  9. - SZ_ERROR_UNSUPPORTED - Unsupported properties
  10. -*/
  11. -
  12. -SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size);
  13. -
  14. /* ---------- LZMA Decoder state ---------- */
  15. @@ -70,8 +62,6 @@ typedef struct
  16. #define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; }
  17. -void LzmaDec_Init(CLzmaDec *p);
  18. -
  19. /* There are two types of LZMA streams:
  20. 0) Stream with end mark. That end mark adds about 6 bytes to compressed size.
  21. 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */
  22. @@ -108,97 +98,6 @@ typedef enum
  23. /* ELzmaStatus is used only as output value for function call */
  24. -
  25. -/* ---------- Interfaces ---------- */
  26. -
  27. -/* There are 3 levels of interfaces:
  28. - 1) Dictionary Interface
  29. - 2) Buffer Interface
  30. - 3) One Call Interface
  31. - You can select any of these interfaces, but don't mix functions from different
  32. - groups for same object. */
  33. -
  34. -
  35. -/* There are two variants to allocate state for Dictionary Interface:
  36. - 1) LzmaDec_Allocate / LzmaDec_Free
  37. - 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs
  38. - You can use variant 2, if you set dictionary buffer manually.
  39. - For Buffer Interface you must always use variant 1.
  40. -
  41. -LzmaDec_Allocate* can return:
  42. - SZ_OK
  43. - SZ_ERROR_MEM - Memory allocation error
  44. - SZ_ERROR_UNSUPPORTED - Unsupported properties
  45. -*/
  46. -
  47. -SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
  48. -void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
  49. -
  50. -SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc);
  51. -void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc);
  52. -
  53. -/* ---------- Dictionary Interface ---------- */
  54. -
  55. -/* You can use it, if you want to eliminate the overhead for data copying from
  56. - dictionary to some other external buffer.
  57. - You must work with CLzmaDec variables directly in this interface.
  58. -
  59. - STEPS:
  60. - LzmaDec_Constr()
  61. - LzmaDec_Allocate()
  62. - for (each new stream)
  63. - {
  64. - LzmaDec_Init()
  65. - while (it needs more decompression)
  66. - {
  67. - LzmaDec_DecodeToDic()
  68. - use data from CLzmaDec::dic and update CLzmaDec::dicPos
  69. - }
  70. - }
  71. - LzmaDec_Free()
  72. -*/
  73. -
  74. -/* LzmaDec_DecodeToDic
  75. -
  76. - The decoding to internal dictionary buffer (CLzmaDec::dic).
  77. - You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
  78. -
  79. -finishMode:
  80. - It has meaning only if the decoding reaches output limit (dicLimit).
  81. - LZMA_FINISH_ANY - Decode just dicLimit bytes.
  82. - LZMA_FINISH_END - Stream must be finished after dicLimit.
  83. -
  84. -Returns:
  85. - SZ_OK
  86. - status:
  87. - LZMA_STATUS_FINISHED_WITH_MARK
  88. - LZMA_STATUS_NOT_FINISHED
  89. - LZMA_STATUS_NEEDS_MORE_INPUT
  90. - LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
  91. - SZ_ERROR_DATA - Data error
  92. -*/
  93. -
  94. -SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit,
  95. - const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
  96. -
  97. -
  98. -/* ---------- Buffer Interface ---------- */
  99. -
  100. -/* It's zlib-like interface.
  101. - See LzmaDec_DecodeToDic description for information about STEPS and return results,
  102. - but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need
  103. - to work with CLzmaDec variables manually.
  104. -
  105. -finishMode:
  106. - It has meaning only if the decoding reaches output limit (*destLen).
  107. - LZMA_FINISH_ANY - Decode just destLen bytes.
  108. - LZMA_FINISH_END - Stream must be finished after (*destLen).
  109. -*/
  110. -
  111. -SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
  112. - const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
  113. -
  114. -
  115. /* ---------- One Call Interface ---------- */
  116. /* LzmaDecode
  117. --- a/lib/lzma/LzmaDec.c
  118. +++ b/lib/lzma/LzmaDec.c
  119. @@ -682,7 +682,7 @@ static void LzmaDec_InitRc(CLzmaDec *p,
  120. p->needFlush = 0;
  121. }
  122. -void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
  123. +static void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
  124. {
  125. p->needFlush = 1;
  126. p->remainLen = 0;
  127. @@ -698,7 +698,7 @@ void LzmaDec_InitDicAndState(CLzmaDec *p
  128. p->needInitState = 1;
  129. }
  130. -void LzmaDec_Init(CLzmaDec *p)
  131. +static void LzmaDec_Init(CLzmaDec *p)
  132. {
  133. p->dicPos = 0;
  134. LzmaDec_InitDicAndState(p, True, True);
  135. @@ -716,7 +716,7 @@ static void LzmaDec_InitStateReal(CLzmaD
  136. p->needInitState = 0;
  137. }
  138. -SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen,
  139. +static SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen,
  140. ELzmaFinishMode finishMode, ELzmaStatus *status)
  141. {
  142. SizeT inSize = *srcLen;
  143. @@ -837,7 +837,7 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, Si
  144. return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA;
  145. }
  146. -SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
  147. +static __maybe_unused SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
  148. {
  149. SizeT outSize = *destLen;
  150. SizeT inSize = *srcLen;
  151. @@ -877,7 +877,7 @@ SRes LzmaDec_DecodeToBuf(CLzmaDec *p, By
  152. }
  153. }
  154. -void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc)
  155. +static void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc)
  156. {
  157. alloc->Free(alloc, p->probs);
  158. p->probs = 0;
  159. @@ -889,13 +889,13 @@ static void LzmaDec_FreeDict(CLzmaDec *p
  160. p->dic = 0;
  161. }
  162. -void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc)
  163. +static void __maybe_unused LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc)
  164. {
  165. LzmaDec_FreeProbs(p, alloc);
  166. LzmaDec_FreeDict(p, alloc);
  167. }
  168. -SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
  169. +static SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
  170. {
  171. UInt32 dicSize;
  172. Byte d;
  173. @@ -935,7 +935,7 @@ static SRes LzmaDec_AllocateProbs2(CLzma
  174. return SZ_OK;
  175. }
  176. -SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
  177. +static SRes __maybe_unused LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
  178. {
  179. CLzmaProps propNew;
  180. RINOK(LzmaProps_Decode(&propNew, props, propsSize));
  181. @@ -944,7 +944,7 @@ SRes LzmaDec_AllocateProbs(CLzmaDec *p,
  182. return SZ_OK;
  183. }
  184. -SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
  185. +static SRes __maybe_unused LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
  186. {
  187. CLzmaProps propNew;
  188. SizeT dicBufSize;
  189. --- a/include/linux/lzma/LzmaEnc.h
  190. +++ b/include/linux/lzma/LzmaEnc.h
  191. @@ -31,9 +31,6 @@ typedef struct _CLzmaEncProps
  192. } CLzmaEncProps;
  193. void LzmaEncProps_Init(CLzmaEncProps *p);
  194. -void LzmaEncProps_Normalize(CLzmaEncProps *p);
  195. -UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2);
  196. -
  197. /* ---------- CLzmaEncHandle Interface ---------- */
  198. @@ -53,26 +50,9 @@ CLzmaEncHandle LzmaEnc_Create(ISzAlloc *
  199. void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig);
  200. SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props);
  201. SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size);
  202. -SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream,
  203. - ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
  204. SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
  205. int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
  206. -/* ---------- One Call Interface ---------- */
  207. -
  208. -/* LzmaEncode
  209. -Return code:
  210. - SZ_OK - OK
  211. - SZ_ERROR_MEM - Memory allocation error
  212. - SZ_ERROR_PARAM - Incorrect paramater
  213. - SZ_ERROR_OUTPUT_EOF - output buffer overflow
  214. - SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version)
  215. -*/
  216. -
  217. -SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
  218. - const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
  219. - ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
  220. -
  221. #ifdef __cplusplus
  222. }
  223. #endif
  224. --- a/lib/lzma/LzmaEnc.c
  225. +++ b/lib/lzma/LzmaEnc.c
  226. @@ -53,7 +53,7 @@ void LzmaEncProps_Init(CLzmaEncProps *p)
  227. p->writeEndMark = 0;
  228. }
  229. -void LzmaEncProps_Normalize(CLzmaEncProps *p)
  230. +static void LzmaEncProps_Normalize(CLzmaEncProps *p)
  231. {
  232. int level = p->level;
  233. if (level < 0) level = 5;
  234. @@ -76,7 +76,7 @@ void LzmaEncProps_Normalize(CLzmaEncProp
  235. #endif
  236. }
  237. -UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2)
  238. +static UInt32 __maybe_unused LzmaEncProps_GetDictSize(const CLzmaEncProps *props2)
  239. {
  240. CLzmaEncProps props = *props2;
  241. LzmaEncProps_Normalize(&props);
  242. @@ -93,7 +93,7 @@ UInt32 LzmaEncProps_GetDictSize(const CL
  243. #define BSR2_RET(pos, res) { unsigned long i; _BitScanReverse(&i, (pos)); res = (i + i) + ((pos >> (i - 1)) & 1); }
  244. -UInt32 GetPosSlot1(UInt32 pos)
  245. +static UInt32 GetPosSlot1(UInt32 pos)
  246. {
  247. UInt32 res;
  248. BSR2_RET(pos, res);
  249. @@ -107,7 +107,7 @@ UInt32 GetPosSlot1(UInt32 pos)
  250. #define kNumLogBits (9 + (int)sizeof(size_t) / 2)
  251. #define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7)
  252. -void LzmaEnc_FastPosInit(Byte *g_FastPos)
  253. +static void LzmaEnc_FastPosInit(Byte *g_FastPos)
  254. {
  255. int c = 2, slotFast;
  256. g_FastPos[0] = 0;
  257. @@ -339,7 +339,7 @@ typedef struct
  258. CSaveState saveState;
  259. } CLzmaEnc;
  260. -void LzmaEnc_SaveState(CLzmaEncHandle pp)
  261. +static void __maybe_unused LzmaEnc_SaveState(CLzmaEncHandle pp)
  262. {
  263. CLzmaEnc *p = (CLzmaEnc *)pp;
  264. CSaveState *dest = &p->saveState;
  265. @@ -365,7 +365,7 @@ void LzmaEnc_SaveState(CLzmaEncHandle pp
  266. memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb));
  267. }
  268. -void LzmaEnc_RestoreState(CLzmaEncHandle pp)
  269. +static void __maybe_unused LzmaEnc_RestoreState(CLzmaEncHandle pp)
  270. {
  271. CLzmaEnc *dest = (CLzmaEnc *)pp;
  272. const CSaveState *p = &dest->saveState;
  273. @@ -600,7 +600,7 @@ static void LitEnc_EncodeMatched(CRangeE
  274. while (symbol < 0x10000);
  275. }
  276. -void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
  277. +static void LzmaEnc_InitPriceTables(UInt32 *ProbPrices)
  278. {
  279. UInt32 i;
  280. for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits))
  281. @@ -1676,7 +1676,7 @@ static void FillDistancesPrices(CLzmaEnc
  282. p->matchPriceCount = 0;
  283. }
  284. -void LzmaEnc_Construct(CLzmaEnc *p)
  285. +static void LzmaEnc_Construct(CLzmaEnc *p)
  286. {
  287. RangeEnc_Construct(&p->rc);
  288. MatchFinder_Construct(&p->matchFinderBase);
  289. @@ -1709,7 +1709,7 @@ CLzmaEncHandle LzmaEnc_Create(ISzAlloc *
  290. return p;
  291. }
  292. -void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
  293. +static void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc)
  294. {
  295. alloc->Free(alloc, p->litProbs);
  296. alloc->Free(alloc, p->saveState.litProbs);
  297. @@ -2074,7 +2074,7 @@ SRes LzmaEnc_MemPrepare(CLzmaEncHandle p
  298. return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig);
  299. }
  300. -void LzmaEnc_Finish(CLzmaEncHandle pp)
  301. +static void LzmaEnc_Finish(CLzmaEncHandle pp)
  302. {
  303. #ifndef _7ZIP_ST
  304. CLzmaEnc *p = (CLzmaEnc *)pp;
  305. @@ -2108,7 +2108,7 @@ static size_t MyWrite(void *pp, const vo
  306. }
  307. -UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
  308. +static UInt32 __maybe_unused LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp)
  309. {
  310. const CLzmaEnc *p = (CLzmaEnc *)pp;
  311. return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj);
  312. @@ -2120,7 +2120,7 @@ const Byte *LzmaEnc_GetCurBuf(CLzmaEncHa
  313. return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset;
  314. }
  315. -SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
  316. +static SRes __maybe_unused LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit,
  317. Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
  318. {
  319. CLzmaEnc *p = (CLzmaEnc *)pp;
  320. @@ -2248,7 +2248,7 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle pp
  321. return res;
  322. }
  323. -SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
  324. +static __maybe_unused SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen,
  325. const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark,
  326. ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig)
  327. {
  328. --- a/include/linux/lzma/LzFind.h
  329. +++ b/include/linux/lzma/LzFind.h
  330. @@ -55,11 +55,6 @@ typedef struct _CMatchFinder
  331. #define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)
  332. -int MatchFinder_NeedMove(CMatchFinder *p);
  333. -Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);
  334. -void MatchFinder_MoveBlock(CMatchFinder *p);
  335. -void MatchFinder_ReadIfRequired(CMatchFinder *p);
  336. -
  337. void MatchFinder_Construct(CMatchFinder *p);
  338. /* Conditions:
  339. @@ -70,12 +65,6 @@ int MatchFinder_Create(CMatchFinder *p,
  340. UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
  341. ISzAlloc *alloc);
  342. void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc);
  343. -void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems);
  344. -void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue);
  345. -
  346. -UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son,
  347. - UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,
  348. - UInt32 *distances, UInt32 maxLen);
  349. /*
  350. Conditions:
  351. @@ -102,12 +91,6 @@ typedef struct _IMatchFinder
  352. void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable);
  353. -void MatchFinder_Init(CMatchFinder *p);
  354. -UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
  355. -UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
  356. -void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
  357. -void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
  358. -
  359. #ifdef __cplusplus
  360. }
  361. #endif
  362. --- a/lib/lzma/LzFind.c
  363. +++ b/lib/lzma/LzFind.c
  364. @@ -42,12 +42,12 @@ static int LzInWindow_Create(CMatchFinde
  365. return (p->bufferBase != 0);
  366. }
  367. -Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
  368. -Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
  369. +static Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; }
  370. +static Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; }
  371. -UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
  372. +static UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; }
  373. -void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
  374. +static void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue)
  375. {
  376. p->posLimit -= subValue;
  377. p->pos -= subValue;
  378. @@ -268,7 +268,7 @@ static void MatchFinder_SetLimits(CMatch
  379. p->posLimit = p->pos + limit;
  380. }
  381. -void MatchFinder_Init(CMatchFinder *p)
  382. +static void MatchFinder_Init(CMatchFinder *p)
  383. {
  384. UInt32 i;
  385. for (i = 0; i < p->hashSizeSum; i++)
  386. @@ -287,7 +287,7 @@ static UInt32 MatchFinder_GetSubValue(CM
  387. return (p->pos - p->historySize - 1) & kNormalizeMask;
  388. }
  389. -void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems)
  390. +static void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems)
  391. {
  392. UInt32 i;
  393. for (i = 0; i < numItems; i++)
  394. @@ -350,7 +350,7 @@ static UInt32 * Hc_GetMatchesSpec(UInt32
  395. }
  396. }
  397. -UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
  398. +static UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son,
  399. UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue,
  400. UInt32 *distances, UInt32 maxLen)
  401. {
  402. @@ -492,7 +492,7 @@ static UInt32 Bt2_MatchFinder_GetMatches
  403. GET_MATCHES_FOOTER(offset, 1)
  404. }
  405. -UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
  406. +static __maybe_unused UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
  407. {
  408. UInt32 offset;
  409. GET_MATCHES_HEADER(3)
  410. @@ -632,7 +632,7 @@ static UInt32 Hc4_MatchFinder_GetMatches
  411. MOVE_POS_RET
  412. }
  413. -UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
  414. +static __maybe_unused UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances)
  415. {
  416. UInt32 offset;
  417. GET_MATCHES_HEADER(3)
  418. @@ -657,7 +657,7 @@ static void Bt2_MatchFinder_Skip(CMatchF
  419. while (--num != 0);
  420. }
  421. -void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  422. +static __maybe_unused void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  423. {
  424. do
  425. {
  426. @@ -718,7 +718,7 @@ static void Hc4_MatchFinder_Skip(CMatchF
  427. while (--num != 0);
  428. }
  429. -void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  430. +static __maybe_unused void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num)
  431. {
  432. do
  433. {