TAMPA — Giancarlo Stanton looked upset when hit was hit by a Brett McKinney pitch just after McKinney entered the game in the bottom of the third in Thursday’s 9-5 win over the Pirates at George M. Steinbrenner Field.

In the top of the fourth, Adam Warren drilled Jose Osuna in the ankle before Felipe Rivero buzzed Greg Bird and Wade in the bottom of the inning.

Aaron Boone, though, said he wasn’t worried there was intent to any of the errant pitches.

Boone said he believes Sonny Gray needs to attack hitters more than he did on Thursday, when gave up three runs — and walked three — in just three innings.

“He’s so talented and can do so many things with the ball,” Boone said. “He’s just got to trust the zone a little more. Sometimes he nibbles and loses the zone.”

Gray agreed.

“It was a battle to find the zone,” the right-hander said. “I need to get deeper into the game. That’s the goal for next time.”

Chance Adams, coming off a disappointing outing against the Orioles on Wednesday, was reassigned to minor league camp.

Chasen Shreve threw 1 ²/₃ scoreless innings in the Yankees’ 9-5 win over the Pirates and hasn’t been scored upon this spring as he attempts to stick around as the primary lefty out of the bullpen — other than closer Aroldis Chapman.

Dellin Betances allowed a two-run homer to Jose Osuna after a single and stolen base by Sean Rodriguez in the sixth. He’s given up four runs in 3 ¹/₃ innings in four Grapefruit League outings.

Former Yankee Francisco Cervelli hit his first homer of the spring when he took Sonny Gray deep in the first inning.

Neil Walker is expected to make his debut with the Yankees when they play host to the Astros at 6:35 p.m. at George M. Steinbrenner Field.

Jordan Montgomery will try to bounce back from his rough outing in his last start, which followed him being named the team’s fifth starter.