Fix warnings generated by #3158

rapid7/metasploit-framework#3158