Print deprecation warning only when there is one.