Your warranty won't be affected unless your 3rd party parts cause the fault that occurs. You can always get round this by putting the stock parts back in before you return it under warranty.
For this reason, I would highly recommend that unlike many others, when you upgrade parts (even the RAM), do NOT sell it. If you have to take your machine in for repair, you'll need to put all your stock components back in so they have no excuse to deny you a repair/replacement.