Let's say there are two systems which can interact by a moving wall but cannot exchange heat. Then the system will be in mechanical, but not necessarily in thermal equilibrium.
The maximality of entropy in mechanical equilibrium requires only the ratio p/T to be equal. So there is a possible equilibrium state where one system has double pressure and double temperature...
Where is my mistake?