The compiler cannot tell from that code if the function will ever reach the end and still return something. To make that clear, replace the last else if(...)
with just else
.
More Related Contents:
- warning: suggest parentheses around assignment used as truth value [closed]
- my code does not work and I don’t know why ;-;
- Why should I always enable compiler warnings?
- warning: implicit declaration of function
- How to disable GCC warnings for a few lines of code
- How to turn on (literally) ALL of GCC’s warnings?
- What are the valid characters for macro names?
- What does i = (i, ++i, 1) + 1; do?
- Assignment makes pointer from integer without cast
- Get warning when a variable is shadowed
- Disable warning: the `gets’ function is dangerous in GCC through header files?
- Is using #pragma warning push/pop the right way to temporarily alter warning level?
- warning: return type defaults to ‘int’ [-Wreturn-type]
- Compiler warning – suggest parentheses around assignment used as truth value
- Empty structure in C
- Message “warning: implicit declaration of function”
- How can I turn on (literally) ALL of GCC’s warnings?
- Why do I get a warning every time I use malloc?
- gcc failing to warn of uninitialized variable
- Compiler warning for function defined without prototype in scope?
- Why do compilers not warn about out-of-bounds static array indices?
- why am I not getting an “used uninitialized” warning from gcc in this trivial example? [duplicate]
- Can GCC not complain about undefined references?
- Undefined reference to pthread_create in Linux
- How to compare pointer to strings in C
- File Operations in Android NDK
- Passing too many arguments to printf
- Is the sizeof(enum) == sizeof(int), always?
- What is ‘:-!!’ in C?
- Why vectorizing the loop over 64-bit elements does not have performance improvement over large buffers?