in reply to warnings when using % and printf

Your code sample and the error message don't match. You're using print and that error message is about printf. It's coming from somewhere else -- you need to figure out where first.

As to the error itself, there's no format specification %) (nor %\n). You may be thinking that the percent sign goes both before and after the format (like %s%). It doesn't, it only goes in front (like %s).