Costco's (NASDAQ:COST) latest quarterly earnings report doesn't do too much to dispel the recent gloom surrounding retail, but investors found some silver linings behind Costco's falling profit.

Second-quarter net income fell 26% to $239.7 million, or $0.55 per share. Revenue dropped 1% to $16.49 billion. Same-store sales fell 3%, although the strong dollar and falling gasoline prices contributed to the hit. If you strip out those factors, same-store sales increased 5%.

Costco described negative influences, mostly regarding the ugly economy we're all well aware of. The company faces continued challenges in pushing non-food sales, which subsequently affects margins. In addition, the company had to cut prices before the holidays to drive sales, further pressuring margins. Still, last month Costco gave an inkling that things weren't easy out there on the warehouse sales floors, so today's news probably proved to be a relief to investors.

The discount retail sector can be viewed as among the safest in these troubled times, but that doesn't mean these companies are immune. Wal-Mart (NYSE:WMT) also reported a decreased quarterly profit last month, and Target's (NYSE:TGT) latest quarterly profit fell by a precipitous amount.

Meanwhile, BJ's Wholesale (NYSE:BJ) and Big Lots (NYSE:BIG) also reported on their latest quarters today. BJ's profit increased 5% year over year, which included some help from a favorable tax benefit, but Big Lots' quarterly profit dropped 14%.

Costco, which has been recommended by both Motley Fool Stock Advisor and Inside Value, still strikes me as a great long-term stock for investors, given not only its discount niche, but also its historically smart management and solid balance sheet. Still, it seems to me that investors will have to steel themselves to keep the long-term view as consumers cope with difficult times.

Wal-Mart Stores is also an Inside Value pick. Try any of our Foolish newsletters today, free for 30 days.

Alyce Lomax does not own shares of any of the companies mentioned. The Fool has a disclosure policy.