Homeless man charged with murder in attack in Walmart