Fixed unused variables and potentially uninitialized variables warnings.
Disable profiling counters by default, because it needs linker script support.