Remove unused variables
This commit is contained in:
parent
5c8c0ce4d8
commit
6ed2992862
@ -23,7 +23,7 @@ if_else_same_check="skip-unittest"
|
|||||||
; Checks for some problems with constructors
|
; Checks for some problems with constructors
|
||||||
constructor_check="skip-unittest"
|
constructor_check="skip-unittest"
|
||||||
; Checks for unused variables and function parameters
|
; Checks for unused variables and function parameters
|
||||||
unused_variable_check="disabled"
|
unused_variable_check="skip-unittest"
|
||||||
; Checks for unused labels
|
; Checks for unused labels
|
||||||
unused_label_check="skip-unittest"
|
unused_label_check="skip-unittest"
|
||||||
; Checks for duplicate attributes
|
; Checks for duplicate attributes
|
||||||
|
@ -20,7 +20,6 @@ import tanya.meta.trait;
|
|||||||
version (unittest)
|
version (unittest)
|
||||||
{
|
{
|
||||||
private int fillBuffer(ubyte[] buffer,
|
private int fillBuffer(ubyte[] buffer,
|
||||||
in size_t size,
|
|
||||||
int start = 0,
|
int start = 0,
|
||||||
int end = 10) @nogc pure nothrow
|
int end = 10) @nogc pure nothrow
|
||||||
in
|
in
|
||||||
@ -173,7 +172,7 @@ struct ReadBuffer(T = ubyte)
|
|||||||
assert(b.free == 0);
|
assert(b.free == 0);
|
||||||
|
|
||||||
// Fills the buffer with values 0..10
|
// Fills the buffer with values 0..10
|
||||||
numberRead = fillBuffer(b[], b.free, 0, 10);
|
numberRead = fillBuffer(b[], 0, 10);
|
||||||
b += numberRead;
|
b += numberRead;
|
||||||
assert(b.free == b.blockSize - numberRead);
|
assert(b.free == b.blockSize - numberRead);
|
||||||
b.clear();
|
b.clear();
|
||||||
@ -204,7 +203,7 @@ struct ReadBuffer(T = ubyte)
|
|||||||
ubyte[] result;
|
ubyte[] result;
|
||||||
|
|
||||||
// Fills the buffer with values 0..10
|
// Fills the buffer with values 0..10
|
||||||
numberRead = fillBuffer(b[], b.free, 0, 10);
|
numberRead = fillBuffer(b[], 0, 10);
|
||||||
b += numberRead;
|
b += numberRead;
|
||||||
|
|
||||||
result = b[0 .. $];
|
result = b[0 .. $];
|
||||||
@ -214,10 +213,10 @@ struct ReadBuffer(T = ubyte)
|
|||||||
b.clear();
|
b.clear();
|
||||||
|
|
||||||
// It shouldn't overwrite, but append another 5 bytes to the buffer
|
// It shouldn't overwrite, but append another 5 bytes to the buffer
|
||||||
numberRead = fillBuffer(b[], b.free, 0, 10);
|
numberRead = fillBuffer(b[], 0, 10);
|
||||||
b += numberRead;
|
b += numberRead;
|
||||||
|
|
||||||
numberRead = fillBuffer(b[], b.free, 20, 25);
|
numberRead = fillBuffer(b[], 20, 25);
|
||||||
b += numberRead;
|
b += numberRead;
|
||||||
|
|
||||||
result = b[0..$];
|
result = b[0..$];
|
||||||
@ -279,7 +278,7 @@ struct ReadBuffer(T = ubyte)
|
|||||||
ubyte[] result;
|
ubyte[] result;
|
||||||
|
|
||||||
// Fills the buffer with values 0..10
|
// Fills the buffer with values 0..10
|
||||||
numberRead = fillBuffer(b[], b.free, 0, 10);
|
numberRead = fillBuffer(b[], 0, 10);
|
||||||
b += numberRead;
|
b += numberRead;
|
||||||
|
|
||||||
assert(b.length == 10);
|
assert(b.length == 10);
|
||||||
@ -599,8 +598,6 @@ struct WriteBuffer(T = ubyte)
|
|||||||
*/
|
*/
|
||||||
T[] opSlice(in size_t start, in size_t end)
|
T[] opSlice(in size_t start, in size_t end)
|
||||||
{
|
{
|
||||||
immutable internStart = this.start + start;
|
|
||||||
|
|
||||||
if (position > ring || position < start) // Buffer overflowed
|
if (position > ring || position < start) // Buffer overflowed
|
||||||
{
|
{
|
||||||
return buffer_[this.start .. ring + 1 - length + end];
|
return buffer_[this.start .. ring + 1 - length + end];
|
||||||
|
@ -632,7 +632,6 @@ do
|
|||||||
size_t i;
|
size_t i;
|
||||||
auto tmp1 = Integer(x, x.allocator);
|
auto tmp1 = Integer(x, x.allocator);
|
||||||
auto result = Integer(x.allocator);
|
auto result = Integer(x.allocator);
|
||||||
bool firstBit;
|
|
||||||
|
|
||||||
if (x.size == 0 && y.size != 0)
|
if (x.size == 0 && y.size != 0)
|
||||||
{
|
{
|
||||||
|
@ -104,6 +104,7 @@ final class Mallocator : Allocator
|
|||||||
bool reallocateInPlace(ref void[] p, size_t size)
|
bool reallocateInPlace(ref void[] p, size_t size)
|
||||||
@nogc nothrow pure shared @system
|
@nogc nothrow pure shared @system
|
||||||
{
|
{
|
||||||
|
cast(void) size;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user