The rebuilding White Sox announced their trade of right-hander Anthony Swarzak to the contending Brewers for minor-league outfielder Ryan Cordell on Wednesday.

The 31-year-old Swarzak, the most effective pitcher left in the Sox bullpen after the Sox traded David Robertson and Tommy Kahnle to the Yankees last week, was 4-3 with a 2.23 ERA with 52 strikeouts over 48 1/3 innings for the Sox. He was signed as a minor-league free agent in January.

The Sox haven’t announced who will replace Swarzak on the 25-man roster before the Sox host the Cubs Wednesday night.

Cordell, 25, is batting .284 with 10 homers, 45 RBU and nine stolen bases in 68 games for the Brewers’ Class AAA affiliate in Colorado Springs. The 6-foot-4, 195-pound Cordell has been on the seven-day disabled list since June 30 (retroactive to June 27) with a strained back.

Cordell was the Brewers’ No. 17-ranked prospect. He is a 276 hitter with 65 homers, 90 doubles, 24 triples, 272 RBI and 81 stolen base in 452 games over five minor-league seasons (2013-17) between the Rangers and Brewers farm systems.

Cordell was acquired by the Brewers last September as the player-to-be-named to complete a five-player trade which sent catcher Jonathan Lucroy and right-hander Jeremy Jeffress to the Rangers. He was drafted by the Rangers in the 11th in 2013.

Ryan Cordell has hit for power and flashed some speed as a Brewers prospect.

Lopez up next?

With an open spot on the roster and pitching staff, speculation heated up that right-hander Reynaldo Lopez could be the next prospect to follow Yoan Moncada from Class AAA Charlotte. The right-hander has been lights-out with a 1.71 ERA, 39 strikeouts and six walks in 31 2/3 innings over his last six starts.

Veteran right-hander James Shields saw Lopez, who came to the Sox in the Adam Eaton trade, during spring training and during his rehab stint at Charlotte.

“He has electric stuff,’’ Shields said. “He attacks hitters, and he’s not scared. He’s going to be a really good big-league pitcher.’’

Lopez, ranked sixth among Sox prospects by Baseball America, made six starts and 11 appearances for the Nationals last year and posted a 5-3 record and 4.91 ERA. So it won’t be uncharted territory.

“I’d give him the same advice I got — don’t change a thing,’’ Shields said. “Pitch exactly to your strengths and don’t change because it’s a certain hitter. Be aggressive and attack him. You’ll be able to make adjustments as you go.’’

Lopez is 6-5 with a 3.65 ERA and 107 strikeouts in 106 innings at Charlotte. If he joins the rotation, the Sox could move starter Mike Pelfrey to the bullpen.

Q in blue

Jose Quintana was slotted to face the Sox on Thursday at Guaranteed Rate Field, but the Cubs bumped him back a day to face the Brewers, an NL Central foe.

“That would’ve been a little weird for me to face the White Sox, but one day, for sure, I would want to face the White Sox,’’ he said.

Going to the North Side made for the easiest of logistical transitions and put Quintana in position to pitch in the postseason for the first time, a win-win for the left-hander.

“I’m feeling really good,’’ said Quintana, who is 2-0 in two starts, against the Orioles and Cardinals. “And I’m excited to be here.’’

Quintana said it was strange talking to teammates across the field but knows “it’s part of the game.’’

Quintana and Cooper exchanged a big hug and had a chat.

“I said, ‘Hi, Coop,’ and he says I look good in blue,’’ Quintana said. “I said yes, but it’s a little weird.’’

Contributing: Madeline Kenney

Follow me on Twitter @CST_soxvan.

Email: dvanschouwen@suntimes.com

RELATED STORIES

Rodon strikes out 11 in four innings but runs out of ammo

Ozzie Guillen, Carlos Zambrano to broadcast Sox, Cubs game in Spanish