Second-quarter earnings and June consumer inflation data offset continuing uncertainty about the Strait of Hormuz.