If you warn someone off, you tell them to go away or to stop doing something because of possible danger or punishment.
The police warned the intruder off...
He spends his spare time visiting schools to warn pupils off drugs.
PHRASAL VERB: V n P, V n P n/-ing, also V P n (not pron)