The 7.4-magnitude earthquake struck off the coast of the southern Philippines island of Mindanao and prompted a tsunami warning.