Fixed some sparse warnings

non ANSI function declaration
Added static to some declarations

Signed-off-by: Hal Rosenstock <hal@mellanox.com>