Added 'warnings' support, fixed bug 2870.