[Bug 6857] Build errors with increased GCC strictness