In a constraints.ucf, how do I tell it to that an unconnected pin is ok?
You don't use the same ucf file for all projects for the same reason you don't use the same schematic. 

Once you've described what you want to achieve in the ucf file, these warnings let you know if you've had a 'fat finger' moment.

If you want to forgo this simple check, then you could write a master ucf file, and a simple VHDL parser that copies the master, auto-commenting out lines it doesn't find used in the VHDL. 

A halfway house that doesn't involve as much upfront work is to manually copy your master 'all commented out' ucf file into your project folder, and manually remove comments from those lines you are going to use.

Alternatively, if you RTFM carefully, you may find a way to suppress specific warnings (it's not advisable to suppress all warnings).