Indonesia warned Wednesday that it could be hit by a small tsunami generated by an 8.2-magnitude earthquake that struck off Chile's Pacific coast and warned people to stay away from beaches.