T cleanup warnings

See individual commit messages for details.  No corresponding JIRAs as these aren't really bugs but code and build system cleanup/maintenance.