core: add printf compiler attribute

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>