You must use products that meet the manufacturer's specifications to uphold the warranty requirements.
In the case of oil filters, where the engine manufacturer does not issue specs, an aftermarket filter maker will provide the warranty in case a filter failure causes damage resulting in a warranty claim. This is only true if you use the filter specified by the filter maker for your engine! No oversized filters or other "good ideas." If you use the specified Fram filter and it fails and causes engine damage, Fram is responsible, not the car maker. Or WIX, or Purolator, or whichever filter maker made the filter.
In the case of the oil, you must use the oil specified. In any case, 10W-40 is a poor oil choice for any engine.
Nothing will totally "void" a warranty. If a failure is caused by an improper part or action, only the repairs caused by that improper stuff might be refused warranty coverage.
So...use the oil grade specified. Use any filter that is specified by the filter maker for your engine.