set_port warning / unused / global/local variable overlap issues