A heat wave gripped large swaths of the Western U.S. on Saturday as temperatures hovered near record highs, heightening wildfire risks in areas that already are dry or burning and prompting warnings for people to stay inside.