only if the warranty concern is directly in line with the modification.
so if you blow your motor due to a lean out. than no. yamaha wont cover it.
if your control box goes faulty, than running the bike lean had nothing to do with it so its still covered by warranty.
well in australia anyway.
Problem is once you modified the airbox, blame will rest on your shoulders. Yamaha will not cover under warranty as it is modified from factory specs and the onus is on you to prove that this did not cause malfunction.