Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Call to 'realloc' has an allocation size of 0 bytes" - static analyzer warning. #90

Open
mralexgray opened this issue Apr 14, 2015 · 0 comments

Comments

@mralexgray
Copy link

Feel free to close this.. But my static analyzer popped up with this "observation". Not quite sure if it is erroneous, or not.. so thought I'd just put it up.

linenoise.c: 447:17: Call to 'realloc' has an allocation size of 0 bytes
linenoise.c: 751:11: Entering loop body
linenoise.c: 757:13: Assuming 'nread' is > 0
linenoise.c: 762:13: Assuming 'c' is not equal to 9
linenoise.c: 751:5: Looping back to the head of the loop
linenoise.c: 751:11: Entering loop body
linenoise.c: 757:13: Assuming 'nread' is > 0
linenoise.c: 762:13: Assuming 'c' is not equal to 9
linenoise.c: 751:5: Looping back to the head of the loop
linenoise.c: 751:11: Entering loop body
linenoise.c: 757:13: Assuming 'nread' is > 0
linenoise.c: 762:13: Assuming 'c' is not equal to 9
linenoise.c: 751:5: Looping back to the head of the loop
linenoise.c: 751:11: Entering loop body
linenoise.c: 757:13: Assuming 'nread' is > 0
linenoise.c: 762:13: Assuming 'c' is not equal to 9
linenoise.c: 890:13: Calling 'refreshLine'
linenoise.c: 584:1: Entered call from '> linenoiseEdit'
linenoise.c: 585:9: Assuming 'mlmode' is not equal to 0
linenoise.c: 586:9: Calling 'refreshMultiLine'
linenoise.c: 502:1: Entered call from 'refreshLine'
linenoise.c: 526:17: Loop body executed 0 times
linenoise.c: 539:5: Calling 'abAppend'
linenoise.c: 446:1: Entered call from 'refreshMultiLine'
linenoise.c: 447:17: Call to 'realloc' has an allocation size of 0 bytes

2015-04-14_05-19-54

@mralexgray mralexgray changed the title Static analyzer warning. "Call to 'realloc' has an allocation size of 0 bytes" - static analyzer warning. Apr 14, 2015
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

No branches or pull requests

1 participant