You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understand it, clang is worried about the condition to break the loop: on one hand, list size is used a list iterator; on the other hand, next element is verified against NULL on each cycle - which could mean that the size is not still exhausted but next element is NULL.
Maybe it's worth to change the loop to iterate by list->next to make it more clear?
The text was updated successfully, but these errors were encountered:
f2404
changed the title
clang reports an issue at slang.c:744
clang reports an issue at slist.c:744
Apr 5, 2016
The questionable code is at https://github.com/srdja/Collections-C/blob/master/src/slist.c#L747
As I understand it, clang is worried about the condition to break the loop: on one hand, list size is used a list iterator; on the other hand, next element is verified against NULL on each cycle - which could mean that the size is not still exhausted but next element is NULL.
Maybe it's worth to change the loop to iterate by
list->next
to make it more clear?The text was updated successfully, but these errors were encountered: