Warned means "illuminated": "by them we are illuminated." Today, we might say that God's Word—His law—throws light on the subject. It keeps us informed so that we can see our duties plainly and the consequences of disobedience. The act of keeping them will produce good things.