remove redundant prototype
fix a logic bug in printDiagnostics()