Add an attribute to start checking format strings

add __attribute__((format(printf,...)) to BarUiMsg() so gcc/clang can do automatic checking of the printf format strings