Walmart and Home Depot gave full-year outlooks that disappointed some investors, as shoppers contend with inflation.