Make tests pass on GCC

And reduce number of warnings below noise treshold. Remaining warnings to
be addressed in subsequent PRs.