STP is layer 2 and OSPF is layer 3... so by the time an interface is configured with "no switchport" then it becomes a L3 interface and not participating in STP. I do not believe there is any simple interference between those 2 protocols, I will need a network diagram to go any further.