Question: is 40 minutes enough for a layover in warsaw?
Answer: Normally it's enough if you are travelling on one ticket and don't have to recheck your bag but as with all flights things may wrong. 40 minutes won't give much buffer. If there is a delay, you may still make it but your luggage may not.