General Mills has posted a 6% rise in full-year profits despite higher input costs and an increase in marketing spending.