]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Void out unused functions 2846/head
authorsenhuang42 <senhuang96@fb.com>
Wed, 3 Nov 2021 14:06:21 +0000 (17:06 +0300)
committersenhuang42 <senhuang96@fb.com>
Thu, 4 Nov 2021 11:32:07 +0000 (14:32 +0300)
lib/compress/huf_compress.c
lib/compress/zstd_compress.c

index 0d2fb6eb8dad0ee8fa0c481e9663f0f7f0ac3d6c..07d57f55c647e7166570d2a8dc420f3eab0b4a03 100644 (file)
@@ -471,8 +471,7 @@ static void HUF_swapNodes(nodeElt* a, nodeElt* b) {
 }
 
 /* Returns 0 if the huffNode array is not sorted by descending count */
-UNUSED_ATTR
-static int HUF_isSorted(nodeElt huffNode[], U32 const maxSymbolValue1) {
+MEM_STATIC int HUF_isSorted(nodeElt huffNode[], U32 const maxSymbolValue1) {
     U32 i;
     for (i = 1; i < maxSymbolValue1; ++i) {
         if (huffNode[i].count > huffNode[i-1].count) {
index ad57cce8cf61fe04fd6ed9ff35a181fdfadae182..f870bad636b9c1fb2d7a2533812dfe94634516a1 100644 (file)
@@ -3737,16 +3737,6 @@ static size_t ZSTD_compressBlock_splitBlock(ZSTD_CCtx* zc,
     return cSize;
 }
 
-/* ZSTD_convertBlockSequencesToSeqStore()
- * Converts an array of ZSTD_Sequence* with the corresponding original src buffer into
- * the seqStore of a cctx.
- *
- * Returns 0 on success, ZSTD_error on failure.
- */
-static UNUSED_ATTR size_t ZSTD_convertBlockSequencesToSeqStore(ZSTD_CCtx* cctx,
-                                  const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
-                                  const void* src, size_t srcSize);
-
 static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc,
                                         void* dst, size_t dstCapacity,
                                         const void* src, size_t srcSize, U32 frame)
@@ -5836,13 +5826,6 @@ static size_t ZSTD_copySequencesToSeqStoreExplicitBlockDelim(ZSTD_CCtx* cctx, ZS
     return 0;
 }
 
-static size_t ZSTD_convertBlockSequencesToSeqStore(ZSTD_CCtx* cctx,
-                                  const ZSTD_Sequence* inSeqs, size_t inSeqsSize,
-                                  const void* src, size_t srcSize) {
-    ZSTD_sequencePosition dummySeqPos = {0, 0, 0};
-    return ZSTD_copySequencesToSeqStoreExplicitBlockDelim(cctx, &dummySeqPos, inSeqs, inSeqsSize, src, srcSize);
-}
-
 /* Returns the number of bytes to move the current read position back by. Only non-zero
  * if we ended up splitting a sequence. Otherwise, it may return a ZSTD error if something
  * went wrong.