Fix some gcc warnings when compiling on solaris

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>