Fixed remaining compiler warnings in OSX and Linux

Fixed remaining warnings OSX (under clang 4.2) and Linux (under gcc 4.6).