It seems to me that <code>have_warned</code> isn't initialized anywhere and can start with any value (and anything but zero is considered as true).