If you start changing cams, tune, etc. it will affect your warranty. A dealership can still commit to honoring the warranty but that doesn't mean that the warranty will be honored by other dealerships if you're on the road with a breakdown.
Be sure you communicate clearly with the dealership that you want the factory warranty (and extended warranty, if you got that also) to be honored at any dealership, should you break down anywhere in your journeys. Any promise or commitment that they make....get it in writing.
There are a few mods that you can do (Fullsac baffles, TTS tuner, etc. ) and put it back to stock before you take it in for warranty work.
As for extended warranty.....I'm not a fan of them.....except for Harleys! I've gotten the extended warranties (service agreements) since my first bagger in 1989 and they've paid for their self and then some on every bike I've had, since. My ex, Terrie's 09 Street Glide (not a CVO) had the motor replaced after the crank scissored at 30k miles. My 10 CVO Street Glide had the motor rebuilt after the crank scissored at just over 32k miles. Other issues on other baggers have been a transmission main shaft that twisted in to two pieces (that is very rare even for drag bikes), lifters, electrical issues and on and on. On my current bike, a 13 CVO Ultra Classic that I bought used but it had the extended warranty, the rear tire was replaced twice and now it's in the shop getting a new rear wheel, bearings, caliper, etc. due to wheel bearings failure on the freeway, loaded and with passenger (this was a first for me in all my decades of riding). Rear wheel actually had rusted water in it. So, if you are somebody that only puts a few thousand miles a year on your bike and stay pretty much local.....it may not be worth the cost of extended warranty. But if you're a rider and do the long haul tours.....it's a huge piece of mind. JMHO