i'm english learner too
but i will help you as i could
warning: is like an attention to something or somebody that may cause risk or harm. it's like giving an advice in advance.
threating: is a clear and direct intent or risk that causes harm.
i think the professor was warning and not threating, because he advised you to prepare well to avoid having a quiz, while if he was threating, it means that whatever you do and prepare, he is going to give you a quiz.