This is a bit longer task, but as mentioned on #2196 it would be highly beneficial if compilation warnings could be treated as errors.
Of course, we can not just flick the -Werror switch since that would break everything. But it would be useful if we could slowly turn individual warnings into errors. For simplicity we could perhaps initially do this just on ubuntu. Perhaps we could start with -Werror=unused-variable?