tree(): cleanup warnings handling