RadioShack Corp.'s (RSH) second-quarter profit rose a stronger-than-expected 18% as continued cost cuts offset weaker sales of wireless accessories, TV converter boxes and GPS devices.

The Fort Worth, Texas, consumer electronics retailer posted income of $48.8 million, or 39 cents a share, up from $41.4 million, or 32 cents a share a year earlier. The prior year's results included a $4.3 million charge related to the amendment of its headquarters lease, which was partly offset by a state sales-tax settlement.

Revenue decreased 2.9% to $965.7 million as same-store sales fell 4% but were helped by a 24% increase in online sales. Company-operated stores posted a 4.6% drop in same-store sales.

Analysts polled by Thomson Reuters expected earnings of 28 cents and revenue of $977 million.

Analysts had expected weaker sales of digital-to-analog converter boxes after a mid-June deadline passed for broadcasters to switch over their signals. Barclays capital analyst Michael Lasser said converter-box sales were about $50 million for the most recent quarter, compared with an estimated $70 million a year earlier.

RadioShack said wireless accessories, GPS products, music players and digital cameras were also weaker. Netbooks, television antennas, digital TVs and prepaid wireless phones and plans were among products posting sales increases. Among company-operated stores, sales in RadioShack's biggest category, wireless products and services, fell 1.5% in company-operated stores, while accessory sales dropped 9.2%. Sales tied to prepaid wireless airtime and service plans, however, were stronger.

Personal electronics sales dropped 26.1% on lower sales of digital cameras and music players.

A shift to lower margin products in the quarter, including netbook computers and digital TVs, contributed to a lower gross margin, which fell to 46.1% from 47.2% a year earlier. But the retailer cut selling, general and administrative expenses by 10.6% to $335.7 million, which was lower than many analysts expected.

"The company has almost made a habit out of squeezing more costs out of its operation than expected, but this quarter appears to be particularly impressive - especially since it has generally been thought that the cost cutting must run out at some point," RBC Capital Markets analyst Scot Ciccarelli told clients in a research note.

RadioShack has been seeking a way to stay relevant as companies such as Best Buy Co. (BBY) and Wal-Mart Stores Inc. (WMT) take increasing market share in the consumer-electronics space. RadioShack has made basic renovations at most company-owned stores and is testing a standalone mobile-phone store.

Last week, RadioShack announced it would add products and services from Deutsche Telekom AG's (DT) T-Mobile cellphone unit, to its wireless lineup of AT&T and Sprint, giving it another way to lure cellphone customers.

RadioShack hasn't commented on terms of the deal or its expectations for the sales impact, but Ciccarelli said a 10% increase in wireless sales would equate to a 3 percentage point lift in RadioShack's same-store sales.

After a 10.2% jump on Friday, RadioShack shares were 4.9% higher at $16.06 in premarket trading Monday. The stock is up 35% this year.

Cash levels rose 61% while inventories dropped 7.7%.

-By Mary Ellen Lloyd and Kerry Grace Benn, Dow Jones Newswires, 704-948-9145; maryellen.lloyd@dowjones.com