user923005 said:
This is caused by a function that is supposed to return a value (IOW,
a non-void function) that fails to return a value.
It's a programmer bug (IOW *you -- the programmer* did something
wrong).
It's possible he's working with old code, from the
days before `void' entered the language. In those days
a function returning no value would be written like
hello() {
puts ("Hello, world!");
}
Formally, leaving off the return type is not equivalent
to the modern `void hello()' or `void hello(void)', but is
actually equivalent to `int hello()'. The function returns
no value, but there wasn't a way to say so; callers were
just expected to know they shouldn't try to pluck a value
from the hello() function.
Fast-forward to 1989 and the ANSI Standard, which introduced
the notation `void hello()' as an explicit statement that the
function returns no value. This improved things a little,
because now if a caller tried to use the non-existent value
the compiler could complain, and the compiler could also
complain if somebody added `return 42;' in the function body.
But the old notation was still supported so that thousands
of programmers wouldn't waste millions of hours in busy-work
stuffing `void' keywords into working code.
Still, it's an anomaly for a function that is defined as
"I return an int" not to return a value at all. The compiler
may simply be helping out by pointing out a suspicious feature,
something the O.P.'s attention ought to be drawn to, a sort
of mechanical "Are you *sure* you want to do this?" If so, the
warning can be ignored -- but a better cure would be to change
`hello() {...}' to `void hello(void) {...}' (and alter any
declarations to match).
Fast-forward yet again to 1999, and the second major version
of what was by then the ISO Standard finally retired the old
"implicit int" notation. Under the 1999 rules, the old-style
`hello() {...}' is not merely suspect but forbidden. So if the
code is to keep working as the language is now defined, the advice
to "Add `void'" becomes mandatory, not optional.
Or, of course, the O.P.'s code may have some other problem.