resolve warnings with clang

Hello,

I would propose this pull request to resolve some warnings (possible issues).
I tested it with gcc 4.8.1 and clang 3.4 (trunk).