FR 5485 then FR 1062 at Madrid
Porto → Madrid → Warsaw Modlin
Timetable, Madrid time
22:45FR 5485 from Porto at the gate
13:20FR 1062 to Warsaw Modlin leaves the gate
14 h 35 apart on the timetable, overnight
FR 1062 leaves 14 h 35 after FR 5485 arrives on the timetable: more than half a day, so not a connection we count.