[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200415084834.5573-1-yanaijie@huawei.com>
Date: Wed, 15 Apr 2020 16:48:34 +0800
From: Jason Yan <yanaijie@...wei.com>
To: <yanaijie@...wei.com>, <linux-kernel@...r.kernel.org>,
<gustavo@...eddedor.com>, <yamada.masahiro@...ionext.com>,
<miguel.ojeda.sandonis@...il.com>
CC: Hulk Robot <hulkci@...wei.com>
Subject: [PATCH] lib: zstd: remove FSE_sizeof_CTable()
No users of FSE_sizeof_CTable() now, so remove it.
This fixes a sparse warning:
lib/zstd/fse_compress.c:477:8: warning: symbol 'FSE_sizeof_CTable' was
not declared. Should it be static?
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Jason Yan <yanaijie@...wei.com>
---
lib/zstd/fse_compress.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/lib/zstd/fse_compress.c b/lib/zstd/fse_compress.c
index ef3d1741d532..0c059bef379c 100644
--- a/lib/zstd/fse_compress.c
+++ b/lib/zstd/fse_compress.c
@@ -466,20 +466,6 @@ size_t FSE_count_wksp(unsigned *count, unsigned *maxSymbolValuePtr, const void *
/*-**************************************************************
* FSE Compression Code
****************************************************************/
-/*! FSE_sizeof_CTable() :
- FSE_CTable is a variable size structure which contains :
- `U16 tableLog;`
- `U16 maxSymbolValue;`
- `U16 nextStateNumber[1 << tableLog];` // This size is variable
- `FSE_symbolCompressionTransform symbolTT[maxSymbolValue+1];` // This size is variable
-Allocation is manual (C standard does not support variable-size structures).
-*/
-size_t FSE_sizeof_CTable(unsigned maxSymbolValue, unsigned tableLog)
-{
- if (tableLog > FSE_MAX_TABLELOG)
- return ERROR(tableLog_tooLarge);
- return FSE_CTABLE_SIZE_U32(tableLog, maxSymbolValue) * sizeof(U32);
-}
/* provides the minimum logSize to safely represent a distribution */
static unsigned FSE_minTableLog(size_t srcSize, unsigned maxSymbolValue)
--
2.21.1
Powered by blists - more mailing lists