1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-25 10:59:53 +03:00

[src/Mayaqua/Memory.c:2014]: (style) The function 'InsertInt64' is never used.

[src/Mayaqua/Memory.c:2350]: (style) The function 'PadFifoFront' is never used.
[src/Mayaqua/Memory.c:2188]: (style) The function 'PeekFifo' is never used.
This commit is contained in:
Ilya Shipitsin 2018-02-09 18:13:13 +05:00
parent c1dce327c5
commit f1b44906f6
3 changed files with 0 additions and 54 deletions

View File

@ -501,7 +501,6 @@ if (kernel_status_inited) { \
#define KS_FREEFIFO_COUNT 37 // Number of times the FIFO object is deleted #define KS_FREEFIFO_COUNT 37 // Number of times the FIFO object is deleted
#define KS_READ_FIFO_COUNT 38 // Number of calls ReadFifo #define KS_READ_FIFO_COUNT 38 // Number of calls ReadFifo
#define KS_WRITE_FIFO_COUNT 39 // Number of calls WriteFifo #define KS_WRITE_FIFO_COUNT 39 // Number of calls WriteFifo
#define KS_PEEK_FIFO_COUNT 40 // Number of calls PeekFifo
// List related // List related
#define KS_NEWLIST_COUNT 41 // Number of calls NewList #define KS_NEWLIST_COUNT 41 // Number of calls NewList
#define KS_FREELIST_COUNT 42 // Number of times the object LIST was deleted #define KS_FREELIST_COUNT 42 // Number of times the object LIST was deleted

View File

@ -2011,16 +2011,6 @@ void InsertInt(LIST *o, UINT i)
Insert(o, Clone(&i, sizeof(UINT))); Insert(o, Clone(&i, sizeof(UINT)));
} }
void InsertInt64(LIST *o, UINT64 i)
{
// Validate arguments
if (o == NULL)
{
return;
}
Insert(o, Clone(&i, sizeof(UINT64)));
}
// Add an integer to the list (no duplicates) // Add an integer to the list (no duplicates)
void AddIntDistinct(LIST *o, UINT i) void AddIntDistinct(LIST *o, UINT i)
@ -2184,32 +2174,6 @@ LIST *NewListEx2(COMPARE *cmp, bool fast, bool fast_malloc)
return o; return o;
} }
// Peek from the FIFO
UINT PeekFifo(FIFO *f, void *p, UINT size)
{
UINT read_size;
if (f == NULL || size == 0)
{
return 0;
}
// KS
KS_INC(KS_PEEK_FIFO_COUNT);
read_size = MIN(size, f->size);
if (read_size == 0)
{
return 0;
}
if (p != NULL)
{
Copy(p, (UCHAR *)f->p + f->pos, read_size);
}
return read_size;
}
// Read all data from FIFO // Read all data from FIFO
BUF *ReadFifoAll(FIFO *f) BUF *ReadFifoAll(FIFO *f)
{ {
@ -2346,20 +2310,6 @@ void WriteFifo(FIFO *f, void *p, UINT size)
KS_INC(KS_WRITE_FIFO_COUNT); KS_INC(KS_WRITE_FIFO_COUNT);
} }
// Add a padding before the head of fifo
void PadFifoFront(FIFO *f, UINT size)
{
// Validate arguments
if (f == NULL || size == 0)
{
return;
}
f->memsize += size;
f->p = ReAlloc(f->p, f->memsize);
}
// Get the current pointer of the FIFO // Get the current pointer of the FIFO
UCHAR *GetFifoPointer(FIFO *f) UCHAR *GetFifoPointer(FIFO *f)
{ {

View File

@ -348,14 +348,12 @@ BUF *ReadRemainBuf(BUF *b);
UINT ReadBufRemainSize(BUF *b); UINT ReadBufRemainSize(BUF *b);
bool CompareBuf(BUF *b1, BUF *b2); bool CompareBuf(BUF *b1, BUF *b2);
UINT PeekFifo(FIFO *f, void *p, UINT size);
UINT ReadFifo(FIFO *f, void *p, UINT size); UINT ReadFifo(FIFO *f, void *p, UINT size);
BUF *ReadFifoAll(FIFO *f); BUF *ReadFifoAll(FIFO *f);
void ShrinkFifoMemory(FIFO *f); void ShrinkFifoMemory(FIFO *f);
UCHAR *GetFifoPointer(FIFO *f); UCHAR *GetFifoPointer(FIFO *f);
UCHAR *FifoPtr(FIFO *f); UCHAR *FifoPtr(FIFO *f);
void WriteFifo(FIFO *f, void *p, UINT size); void WriteFifo(FIFO *f, void *p, UINT size);
void PadFifoFront(FIFO *f, UINT size);
UINT FifoSize(FIFO *f); UINT FifoSize(FIFO *f);
void ReleaseFifo(FIFO *f); void ReleaseFifo(FIFO *f);
void CleanupFifo(FIFO *f); void CleanupFifo(FIFO *f);
@ -409,7 +407,6 @@ LIST *NewInt64List(bool sorted);
int CompareInt(void *p1, void *p2); int CompareInt(void *p1, void *p2);
int CompareInt64(void *p1, void *p2); int CompareInt64(void *p1, void *p2);
void InsertInt(LIST *o, UINT i); void InsertInt(LIST *o, UINT i);
void InsertInt64(LIST *o, UINT64 i);
void InsertIntDistinct(LIST *o, UINT i); void InsertIntDistinct(LIST *o, UINT i);
void *GetNext(QUEUE *q); void *GetNext(QUEUE *q);