Be explicit – then the compiler won’t warn that you perhaps made a mistake.
while ( (list = list->next) != NULL )
or
while ( (list = list->next) )
Some day you’ll be glad the compiler told you, people do make that mistake π
More Related Contents:
- warning: suggest parentheses around assignment used as truth value [closed]
- my code does not work and I don’t know why ;-;
- warning: implicit declaration of function
- Compilation error: stray β\302β in program, etc
- Why is the .bss segment required?
- How does an uninitiliazed variable get a garbage value?
- What are the valid characters for macro names?
- What do R_X86_64_32S and R_X86_64_64 relocation mean?
- Why are global variables in x86-64 accessed relative to the instruction pointer?
- C compiler asserts – how to implement?
- What does i = (i, ++i, 1) + 1; do?
- When / How does Linux load shared libraries into address space?
- What does “control reaches end of non-void function” mean?
- How many GCC optimization levels are there?
- warning: return type defaults to βintβ [-Wreturn-type]
- Are GCC and Clang parsers really handwritten?
- What happens with an extern inline function?
- C compiler for Windows? [closed]
- Message “warning: implicit declaration of function”
- Which C99 features are available in the MS Visual Studio compiler?
- gcc failing to warn of uninitialized variable
- Does GCC’s __attribute__((__packed__)) retain the original ordering?
- Is there a C compiler that targets the 8086? [closed]
- Avoiding the main (entry point) in a C program
- Statically link ncurses to program
- how do compilers assign memory addresses to variables?
- why am I not getting an “used uninitialized” warning from gcc in this trivial example? [duplicate]
- library not found for -lrt with QtCreator [mac os]
- Can GCC not complain about undefined references?
- Compiler support of GNU Statement Expression