The Swiss veteran earned the only break of the match in the second set of a tight encounter that ended with Lopez hitting a shot into the net on match point.
"Tough match, but I'm really happy to get through," Wawrinka said. "I was looking for my game at the beginning, a bit hesitating with my shots, but in general I think the level was great. It's never easy to play against Feli."
Wawrinka will next face Gilles Simon, who beat fellow Frenchman Jo-Wilfried Tsonga 6-4, 7-5. Fifth-seeded Guido Pella of Argentina also advanced, beating Kwon Soon-woo 7-5, 7-5.
More AP tennis: https://apnews.com/apf-Tennis and https://twitter.com/AP_Sports