UBS posted forecast-beating net profits of $802 million but warned on litigation charges of $1.9 billion.