|Re: [hatari-devel] fixing errors reported by GCC 10 -fanalyzer|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
Le 11/05/2020 à 14:56, Thomas Huth a écrit :
I think I'm with Eero here and rather would prefer to keep such
assert()s that check for logical errors (i.e. things that "should never
happen"). But we should really check for asserts that are used for
"normal" error handling, i.e. the where we use it for checking the
return value of malloc() and friends.
Ok ; but how to we handle the fact that assert are disabled at compile
time in release mode (or with whatever flags a linux distro might
supersedes the flags from hatari) ?
This means assert() will only be visible for developers or those
building in debug mode, but when Hatari is compiled for
mac/windows/linux distro the assert are no more there and we know that
many errors are reported by users, not by people doing the dev. These
people will mostly get a crash sooner or later due to memory corruption
and there will be no message to tell us what happened.