tophat: Fixed compile errors when compiling with clang.

 * the patch additionally fixes a crash introduced into tophat_reports in b5d4a22d072b057d84a02bb1db411c8b2695d13b