Skip to content

lib/itoa: fix array subscript below bounds warning#60

Open
haubi wants to merge 1 commit intobruceg:masterfrom
haubi:master
Open

lib/itoa: fix array subscript below bounds warning#60
haubi wants to merge 1 commit intobruceg:masterfrom
haubi:master

Conversation

@haubi
Copy link

@haubi haubi commented Feb 26, 2019

Trivial fix for this warning seen with gcc-8.2:

itoa.cc: In function 'const char* itoa(long int, int)':
itoa.cc:18:32: warning: array subscript -1 is below array bounds of 'char [64]' [-Warray-bounds]
   while(digits > 0 && ptr > buf-1)
                             ~~~^~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant