He didn't violate the dress code, since a picture of a gun is obviously not "violence." His offenses were more along the lines of politically incorrect thoughtcrime.
Thought Code is in a different chapter of the Student Handbook I guess