소프트웨어
[c++] warning / suggest parentheses around assignment used as truth value [-Wparentheses]
개발자_이훈규
2014. 3. 14. 14:59
suggest parentheses around assignment used as truth value [-Wparentheses]
이건 truth값이 명확하지 않다는 말이다. 코드를 보고 설명하자면,
if( list = list->next ) // 이렇게 하면 =인지 ==인지, list인지 list->next인지 모호함으로,
if( (list = list->next) ) 이렇게 표현하면 경고 표시가 사라지게 된다.