fixing clang issues
fix class/struct mismatch picked up as a warning by clang
remove char-subscript warnings for clang
more clang / mac-osx compile fixes
more clang fixes related to warnings converted to errors by -Werror