bus: _printf_ attributes should be on prototypes not function definitions for non-static functions
Fix a few resource leaks in error paths

https://bugzilla.redhat.com/show_bug.cgi?id=1043304
Fix a few signed/unsigned format string issues

Since numbers involved are all small, behaviour was correct already.

https://bugzilla.redhat.com/show_bug.cgi?id=1043304