We go to eat and drink with friends. Sometimes we eat even without asking what it is. If it is sweet we consume it more quickly than any other food.
Foods which are sweet can be easily used for Sihr. The guy who performs Sihr may read certain things to the food before serving.
The best precaution would be eat food from the people whom you could trust. And don't take foods which are sweet from unknown people if they are prepared before you come.