Countries that haven't signed do violate it. Israel prevents ships free transit to the Gaza strip. US does naval blockades and blows up boats.
But US law is not international law. Internationally you are at war, whatever you call it internally doesn't matter to me.