US food group General Mills has posted higher second-quarter earnings but lowered its full-year earnings guidance, partly due to higher commodities prices.