McDonald's posted a strong profit in its second quarter Tuesday and named a new head of the U.S. market as many Americans grow more cautious about spending.McDonald’s said same-store sales, or sales at locations open at least a year, edged up 0.8% in the U.S. It’s a sharp slowdown from a 2.5% increase a year ago, when the company had a big win with a meal tied to A Minecraft Movie. Global same-store sales rose 1.3%.McDonald’s warned in May that high gas prices and consumer anxiety over the U.S. conflict with Iran could hurt its sales. The U.S. average for regular gasoline reached its most recent peak on May 21 at $4.56 per gallon, according to AAA.The Chicago burger chain earned $2.36 billion, or $3.32 per share, for the three months that ended June 30. A year earlier, it earned $2.25 billion or $3.14 per share.McDonald’s warned in May that high gas prices and consumer anxiety over the U.S. conflict with Iran could hurt its sales (Getty Images)Excluding one time charges and benefits, earnings were $3.38 per share, beating the $3.32 per share analysts polled by FactSet expected.Revenue climbed to $7.1 billion from $6.84 billion in the prior-year period, but came a bit short of Wall Street's estimate of $7.13 billion.Rising costs have hit lower-income Americans the hardest, squeezing their discretionary spending.McDonald's has jostled its menu and has sought to lure some of those customers to stores through value meals and other specials. In April, McDonald’s introduced a simplified McValue menu, which has 10 items that cost $3 or less.Same-store sales growth in the U.S. was just about half of the growth recorded overseas and CEO Chris Kempczinski said the company will address it.“While our playbook is working around the world, we see an opportunity to raise the bar in the U.S. and accelerate performance in our largest market,” Chairman and CEO Chris Kempczinski said in a statement.McDonald's announced Tuesday that Skye Anderson will be president of McDonald's USA.Shares rose 1.6% before the opening bell.