core: gcc macro to warn about unused result

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
core: annotate function to check return value

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