michaeltyson / TPCircularBuffer

A simple, fast circular buffer implementation
http://atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/
839 stars 141 forks source link

Issues with signedness when compiling with aggressive settings on XCode 9 #15

Closed mman closed 6 years ago

mman commented 6 years ago

Hi Micheal,

I have turned on some aggressive compiler checking on my projects, along with the new XCode 9 undefined behavior, runtime behavior, and address sanitizer and uncovered couple of compiler warnings around converting int to uint and others in TPCircularBuffer code.

I wonder whether I should spend some time trying to fix them (read: whether you are interested in pulling these into master).

Attached is an example screenshot from xcode pointing towards buffer length, head, and tail being int32_t which can be negative and (from my limited understanding of your code) they would better be unsigned somethings...

feel free to close as inappropriate or +1 if you want me to investigate this further...

thanks, Martin

screen shot 2017-08-09 at 19 27 06

michaeltyson commented 6 years ago

Hey Martin - sure thing, I'll accept pulls!

Sent from my iPhone

On 10 Aug 2017, at 03:32, Martin Man notifications@github.com wrote:

Hi Micheal,

I have turned on some aggressive compiler checking on my projects, along with the new XCode 9 undefined behavior, runtime behavior, and address sanitizer and uncovered couple of compiler warnings around converting int to uint and others in TPCircularBuffer code.

I wonder whether I should spend some time trying to fix them (read: whether you are interested in pulling these into master).

Attached is an example screenshot from xcode pointing towards buffer length, head, and tail being int32_t which can be negative and (from my limited understanding of your code) they would better be unsigned somethings...

feel free to close as inappropriate or +1 if you want me to investigate this further...

thanks, Martin

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.