Fix warnings / errors with debug_error_level: 32767 (E_ALL)

When you set debug_error_level to E_ALL (32767), you get some errors. The ones I found are fixed with this.