fix gcc warnings, define function Prototyp