HJ Heinz Co and Campbell Soup Co posted better-than-expected quarterly profits, even as price increases meant to offset higher commodity costs hurt sales volume, and shares of both food makers rose in morning trade.

Campbell Soup and Heinz results were not all that great, but were better than expected, said Edward Jones analyst Jack Russo. Expectations were quite low.

By contrast General Mills Inc , which makes Progresso soup and Cheerios cereal, cut its forecast on Friday and its shares fell more than 3 percent. J.M. Smucker also cut its forecast this week, as increased costs hurt margins and higher prices hurt demand.

Heinz, which sells Ore-Ida frozen potatoes and other packaged foods in addition to its namesake ketchup, narrowed its full-year earnings outlook.

Campbell Soup, which sells Pepperidge Farm cookies and V8 juice in addition to its namesake soup, stood by its full-year outlook, despite quarterly sales it said were below its expectations.

Our hypothesis is that continued pressure on the consumer in the current economic environment increased after holiday spending, said Campbell Chief Executive Denise Morrison. The resulting decrease in personal disposable income has forced consumers to reduce discretionary spending, including food.

Heinz reported adjusted third-quarter earnings of 95 cents per share, topping analysts' average estimate of 85 cents per share, according to Thomson Reuters I/B/E/S.

Sales were $2.92 billion, topping analysts' estimate of $2.89 billion. Net pricing rose 4.2 percent, while volume rose 0.4 percent.

Heinz said it now expects 2012 earnings of $3.27 to $3.29 per share excluding a benefit of 5 cents per share from foreign currency exchange rates and one-time charges.

Its prior forecast, which also excluded currency fluctuations and charges, was $3.24 to $3.32 per share.

Campbell Soup's quarterly profit was 64 cents per share, topping analysts' average estimate, according to Thomson Reuters I/B/E/S, by 2 cents per share.

Campbell stood by its 2012 outlook, which calls for earnings of $2.35 to $2.42 per share and net sales to range from flat to up 2 percent.

Campbell's sales fell 1 percent to $2.11 billion, as higher prices could not fully offset the impact of lower volume.

Campbell's U.S. soup business has been lagging for some time

Heinz shares rose 4.4 percent to $54.40 in morning trade on the New York Stock Exchange. Campbell shares rose 2.6 percent to $32.90, while General Mills shares fell 3.6 percent to $38.36.

(Reporting By Martinne Geller in New York, editing by Dave Zimmerman)