Fixed "implicit long-to-int conversion" warnings
Fixed unused-function warnings

The function bodies in header files should be declared static inline.
Disable old OS X GCC workaround if compiling with Clang.