Thanks, Erich! I didn't notice any other warnings, but I guess they may have been scrolled off the page.
Now that you point out the error, yes, I can well see what I've done! That's the problem with not being used to typed languages - I've written tens of thousands of lines of Perl over the last few years, but very, very, little C - so it would have taken me a LONG time to spot that, if you hadn't pointed it out!
Whilst I was waiting to see if anyone came up with an answer, I started testing something else - driving the LEDs by setting the PWM values and the delays between changing them from the output of an LFSR, which I generated the code for using lfsr-generator - makes for some very groovy effects! (This project is actually wearable jewellery - LED effects triggered by an MMA7660 accelerometer, for which I am now working on the I2C code.)
Thanks again for your continued support!