joaoportela / CircularBuffer-CSharp

A simple, single file, implementation of a circular buffer in C#.
The Unlicense
224 stars 45 forks source link

Nullable warnings #60

Closed don-reba closed 5 months ago

don-reba commented 1 year ago

The code fails to build in projects where nullable warnings are enabled and warnings are treated as errors.

CircularBuffer.cs(237,29,237,39): error CS8601: Possible null reference assignment.
CircularBuffer.cs(248,31,248,41): error CS8601: Possible null reference assignment.
CircularBuffer.cs(279,28,279,41): error CS8604: Possible null reference argument for parameter 'sourceArray' in 'void Array.Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)'.
CircularBuffer.cs(314,34,314,47): error CS8602: Dereference of a possibly null reference.
joaoportela commented 1 year ago

I'll take a look into this. If you're comfortable with that, feel free to open a PR.

joaoportela commented 5 months ago

This issue will be tracked here: https://github.com/joaoportela/CircularBuffer-CSharp/issues/27