Skip to contentSkip to conversation

lib: zstd: remove FSE_sizeof_CTable()

PATCH New Jason Yan 1 participant 1 message Apr 15, 2020 Zstd

lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 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?

---
 lib/zstd/fse_compress.c | 14 --------------
 1 file changed, 14 deletions(-)
lib/zstd/fse_compress.c +0 -14
index ef3d1741d532..0c059bef379c 100644
@@ -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)
Signature · 1 line
2.21.1