[tsan] Fix compiler warnings in TSan tests.