This reverts commit 0d7d8b2989, but restore `$warnflags` without the flag, to get rid of using deprecated functions.
0d7d8b2989