Bug 886128 - Fix various clang warnings and some potential bugs in nonstandard configurations.  r=nnethercote,terrence.

--HG--
extra : rebase_source : 0d833ecc9879f5d9fd0a28f9b4eca7793d01aa40