antirez / antirez/linenoise

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

Đang mở
#90 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
4.4k
Fork
741
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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](https://cloud.githubusercontent.com/assets/262517/7133974/7bb1da50-e266-11e4-858d-d6c117ae6623.png)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.