Staticize file-local variables
Avoid casting warning
Prevent icc warning
Use a portable cast
Merge pull request #2134 from libgit2/ben/icc

Fix Intel compiler warnings