When I try to compile the piece of code below, I get this warning:
warning: suggest parentheses around assignment used as truth value
Why does t
It's just a 'safety' warning. It is a relatively common idiom, but also a relatively common error when you meant to have == in there. You can make the warning go away by adding another set of parentheses:
==
while ((list = list->next))