[Ecls-list] Small noreturn warnings cleanup

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Mon Mar 1 17:47:29 UTC 2010


On Mon, Mar 1, 2010 at 5:49 PM, Marko Kocić <marko.kocic at gmail.com> wrote:
> This patch fixes some C warnings in ecl code, especially noreturn ones.
> c compiler reports quite a bit of warnings when building ecl. It might
> make sense to look at them, since some of them seems like valid
> warnings.

Thanks for the patch! Not all of them are valid warnings (I fixed some
of the other ones). In many cases the "return" statement is after a
function that does not return. You should simply ignore them. If we
remove the ecl_attr_noreturn, the code does not get optimized (i.e.
moving error code at the end of the function). If we remove the
"return" statement, other compilers will warn that there is no return
statement.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list