Support more selective endpoint validation for exchanges

And silence some compilation warnings