Walmart reported fourth-quarter earnings that missed analysts’ expectations, though revenue and same-store sales were better than expected.