Yes, the only time you must warn a ship with a hostile tag is when you intend to pirate. If you were forced to make demands before shooting, then the pirate's capships themselves would be contradictory to the rules of no capship pirating. Thererfor, you warn anyone your pirating or those with no tag/neutral/friendly and/or Freelancer/Neutral ID.