Stocks were mostly higher on Thursday, Sept. 28, as consumer names gave rise to the Dow Jones Industrial Average, but losses among media companies weighed on the Nasdaq. 

The Dow  was up 0.21%, the S&P 500 gained 0.12%, and the Nasdaq was flat. 

Consumer staple stocks were among the best performers on Thursday. McDonald's Corp. (MCD) - Get Report , Home Depot Inc. (HD) - Get Report and Coca-Cola Co. (KO) - Get Report led the Dow higher. Anheuser-Busch InBev NV (BUD) - Get Report , PepsiCo Inc. (PEP) - Get Report and Diageo PLC (DEO) - Get Report also posted gains.

Media and telecom stocks were the biggest weight on the Nasdaq on Thursday. Comcast Corp. (CMCSA) - Get Report , Twenty-First Century Fox (FOXA) - Get Report , Discovery Communications Inc. (DISCA) - Get Report   and Viacom (VIAB) - Get Report were the worst performers.

PepsiCo and Comcast are holdings in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio.Want to be alerted before Cramer buys or sells those stocks?Learn more now.

Wall Street weighed second-quarter growth against the potential for a weaker third quarter. The U.S. economy grew at a pace of 3.1% in the second quarter, its fastest growth in more than two years, according to the final estimate of gross domestic product released Thursday. Previous estimates put growth at 3% and economists expected the reading to remain unchanged. Higher GDP was mostly tied to farm inventories. Consumer spending growth held at 3.3%.

But the effect of Hurricanes Harvey, Irma and Maria could put a dent in the July-September quarter. 

"Keep in mind that these are Q2 estimates, and a whole lot has happened in just a few short weeks," said Mike Loewengart, vice president of investment strategy at E*Trade. "It stands to reason that the devastation of the recent hurricanes could weigh heavy when the Q3 estimates come in, and many question how sustainable the 3% threshold is."

Estimates have third-quarter GDP growth at 2.5%, according to FactSet. An initial estimate will be published on Oct. 27.

Companies are already tempering expectations for quarterly performances in the wake of hurricane devastation. Pier 1 Imports Inc. (PIR) - Get Report tumbled 10% after issuing a muted outlook for the full year. Pier 1 expects GAAP earnings of 31 cents to 41 cents a share, below analysts' target of 46 cents. The company revised its guidance to "reflect the anticipated impact of Hurricane Harvey and Irma" on its third-quarter results.

The furniture retailer reported a loss of 10 cents a share, double a year earlier. An adjusted loss of 5 cents a share beat by a penny. Comparable-store sales increased 1.8%, outpacing an expected 0.7%.

Jim Cramer reacts to Kellogg's (K) - Get Report CEO departure.

Sherwin-Williams Co. (SHW) - Get Report also expects the recent hurricanes to impact its third quarter. More than 600 stores were affected by the weather patterns and tens of stores in the Caribbean remain closed. The paint company expects the disruptions to reduce overall third-quarter revenue by $50 million to $70 million. Earnings guidance was also cut to $3.40 to $3.70 a share, down from its previous range of $3.70 to $4.10.

Hurricane activity in the U.S. and the Caribbean will also impact Southwest Airlines Co.'s (LUV) - Get Report quarterly performance. The airline expects operating revenue to be reduced by $100 million after cancelling roughly 5,000 flights. Operating revenue per available seat miles is expected to come in flat to down 1%.

Southwest is a holding in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio.Want to be alerted before Cramer buys or sells LUV?Learn more now.

Weekly jobless claims rose in the past week as blips from Hurricane Irma and Harvey continued to skew the results. The number of new claims for unemployment benefits in the U.S. climbed by 12,000 to 272,000, the Labor Department said Thursday. The less volatile four-week claims average rose by 9,000 to 277,750.

Wall Street clinched solid gains on Wednesday, Sept. 27, as the tech sector rallied and big banks made moves higher after the Trump administration laid out its plans for tax reform. The framework document proposed downsizing individual tax brackets into three from seven and reducing the corporate tax rate to 20%. The proposal was just the beginning -- now congressional Republicans will need to provide the legislative details to turn it into a bill that can pass. 

BlackBerry Ltd.  surged more than 14% on Thursday after reporting a surprise second-quarter profit. The tech company earned an adjusted 5 cents a share, better than expectations of a breakeven result. Revenue declined to $238 million from $334 million. Analysts had anticipated sales of $222 million. Enterprise software and services sales increased 8%, while licensing and IP revenue rocketed 250% higher. For the full year, BlackBerry anticipates sales of at least $920 million, higher than a targeted $916 million. 

Rite Aid Corp. (RAD) - Get Report  declined 11% on Thursday after quarterly sales came up short. Revenue dropped 4.4% to $7.68 billion, below estimates of $7.84 billion. Pharmacy segment sales fell 3.4%, while same-store sales dropped 3.4%. An adjusted net loss of one cent a share met analysts' estimates.  

Applied Materials Inc. (AMAT) - Get Report announced a new share buyback program and positive growth for the long term. The chipmaker anticipates adjusted earnings of $5.08 a share in fiscal 2020 thanks to sustained growth in its internet-of-things and artificial intelligence developments. That implies healthy growth from analysts' expectations of $3.21 a share in the current fiscal year. Applied Materials also authorized $3 billion in share buybacks, adding to the $995 million still available for repurchases.  

The Hain Celestial Group Inc. (HAIN) - Get Report   rose after conceding to activist pressure and announcing changes to its board. The organic foods company will appoint six new directors, including activist investor Engaged Capital's founder, Glenn Welling. Engaged held a 9.9% stake in Hain as of June. 

Roku Inc. (ROKU) - Get Report surged nearly 30% in its market debut to trade at $17.90 a share on Thursday morning. The streaming-device company had priced its initial public offering at $14 a share, the high end of an expected range of $12 to $14. Roku trades on the Nasdaq. 

Updated from 12 p.m. ET, Sept. 28. 

More of What's Trending on TheStreet: