Work around clang/llvm compilation problems.
These patches will allow us to compile the whole AOSP with clang/llvm
before all the following problems are fixed.
* Suppress warnings on unused variables.
* Remove unused static variables.
* Use only gcc to compile code that requires gcc atomic functions.
They should be converted to standard atomic functions later.
* Suppress warnings on redefined typedefs.
BUG:
20765701
Change-Id: Ib1d6e2ef86c255ba87c1d51f9fdeabe5c8de2ada
(cherry picked from commit
23546918662bba21937c4f8fb4c3373588710b5c)