Remove warnings identified by clang 3.4

 * Remove unused static functions
 * Remove unused static variables

cmr=v1.8:reviewer=hjelmn
Update .gitignore
Silence warning when CR is not enabled