Merge from master fixes from Axel for clang warnings. See commit eee18f1f4a13060063b33f84a9ed2479c35b7469
These tests are removed since they are invalid, it does not make sense to check if the address of a reference is a nullptr.
Initialize some variables