warn (one) against (something)
To caution one not to do something that is dangerous or risky. My mother always warned me against hanging out with hoodlums like you, and now I know why. Doctors are warning people against spending too much time in the sun this week lest they suffer dehydration or sunstroke.
warn someone against someone or something
to advise someone against someone, something, or doing something. We warned them all against going to the region at this time. I warned her against Gerald.
warn against
v. To advise someone that something is dangerous or problematic and should be avoided: I warned them against driving without seatbelts. The doctor warns against smoking.