Also the PWM pins are different in a few cases see
PWM Pinout
And the Leonardo has some pins with alternate functions that are not available on the Uno.
Note both the PWM pins and alternate functions on this diagram. It is how I bought the Leonardo outputs to an external socket so the socket positions don't mean anything to you, but if your code uses some of these functions it will not work with a Uno.
That is if you use A6 to A10 that will not work on a Uno.
Likewise if you use Digital pins 18 to 21 that will not work on a Uno. On a Uno the A0 to A3 pins can be used as digital pins 14, 15, 16 & 17.
