widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #04522
Re: [Merge] lp:~widelands-dev/widelands/ai_return_added into lp:widelands
>-Werror=return-type will treat just that warning as an error.
amendment for that: that is a really good thing (TM). Because should in a release build the execution really reach the code path without a return statement, the returned value will be random. This leads to undefined behavior down the path and really hard to debug crashes.
If you want to signalize that a code path is unreachable, just throw an exception there.
--
https://code.launchpad.net/~widelands-dev/widelands/ai_return_added/+merge/275638
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/ai_return_added.
References